The default buffer size for PDO is 1 MB (1048576), try overlaying up to 2 MB (2097152)
If you use PDO directly, pass this as the 4th argument
$pdo = new PDO( $dsn, $username, $password, array(PDO::MYSQL_ATTR_MAX_BUFFER_SIZE => 2097152) );
If you use Laravel, this can be done using the config / database.php file by adding an array of parameters to your connection
// ... 'mysql' => array( 'driver' => 'mysql', // ... 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'options' => array( PDO::MYSQL_ATTR_MAX_BUFFER_SIZE => 2097152 ), ), // ...
source share