packet too large’ error with packet smaller than max_allowed_packet

Posted on

Question :

Some time ago we started storing serialized data in our MySQL database and immediately ran into the well known ‘packet too large’ error. We increased max_allowed_packet to 64M and all was well.

This morning, I suddenly received a too large packet 26814732 error, even though

mysql> show variables like '%packet%';
| Variable_name      | Value    |
| max_allowed_packet | 67108864 |
1 row in set (0.00 sec)

How is this possible? I found this related post, but we are not dealing with mysqldump, we haven’t changed any other database configuration settings and we’ve already been storing BLOBs larger than this one. What could’ve changed to lead to this situation?

Answer :

The problem was not in fact MySQL. We use the DRb Ruby library, which gives a very similar error under similar circumstances: too large packet 26814732. Due to familiarity with the MySQL issue referenced here, I didn’t read the error message well enough and didn’t notice it is slightly different from Packet too Large.

Leave a Reply

Your email address will not be published. Required fields are marked *