DBAtlas · Database operations atlas

1153: Got a packet bigger than 'max_allowed_packet' bytes

MySQL

What does it mean?

The client or server tried to send a data packet larger than the maximum allowed packet size (max_allowed_packet). This usually happens with large BLOB/TEXT values or very large bulk INSERTs.

Why does it happen?

Inserting very large BLOB/TEXT data; a huge single INSERT or multi-row bulk INSERT; a query returning a large result; a small max_allowed_packet value; importing large rows with mysqldump.

How to fix it

Increase max_allowed_packet (on both server and client): SET GLOBAL max_allowed_packet = 67108864; (64MB) and reconnect. To make it permanent, add max_allowed_packet = 64M under [mysqld] in my.cnf. Split large bulk operations into smaller batches. Evaluate whether you really need to store very large values.

Open in DBAtlas →

More from this engine