Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

QuentinPain's avatar

1mb MariaDB field retrieval limit

I've had no problems on localhost or DigitalOcean with Laravel 10.40 (and earlier) using MySQL 8, but when I ported my app to another hosting provider who use MariaDB 10.6, any fields that contained more than 1mb data are truncated to 1mb on retrieval using standard Eloquent commands. However, if I use PHP exec() instead, all fields are returned intact no matter which DB I am using. Does anyone know why this is and if there's a work-around for MariaDB? PS: max_allowed_packet = 268435456 in the MariaDB config.

0 likes
1 reply
QuentinPain's avatar

I've just noticed that Laravel requirement for MariaDB is 10.10+ which could explain the issue. This is hosted on a shared server, so I'm restricted by the service provider. I'll just use exec() instead since that works fine.

PS. The issue is easy to reproduce. If the service provider ever updates MariaDB to 10.10+ and I find it now works with Eloquent, I'll return and update this thread.

Please or to participate in this conversation.