2 years ago

#5966

test-img

Muhammad Khalid Noor

Laravel / PHP / MySQL - Packets out of order

Application coded in Laravel (5.2) / PHP (5.6) using PDO library is generating Packets out of order exception on random requests (Specially after we setup cluster environment with Oracle / MySql 8.0). Below is the complete exception

local.ERROR: exception 'ErrorException' with message 'Packets out of order. Expected 1 received 0. Packet size=145' in /code/vendor/laravel/framework/src/Illuminate/Database/Connection.php:335 Next exception 'Illuminate\Database\QueryException' with message 'Packets out of order. Expected 1 received 0. Packet size=145

We have already tried following parameters in php application code while creating connection.

  • $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);

And setup following parameters at mysql server configuration end

  • max_allowed_packets

php

mysql

laravel

oracle

mysql-cluster

0 Answers

Your Answer

Accepted video resources