MySQL ERROR 1153 (08S01): Got a packet bigger than 'max_allowed_packet' bytes
A single statement or row exceeded max_allowed_packet — big BLOBs, huge INSERTs or large dump lines.
Seen on:
MySQL
Meaning
Both server and client have max_allowed_packet. Imports with extended inserts or large BLOB/TEXT values exceed defaults (64 MB in 8.0, 4 MB in older versions).
Common causes
- Large BLOB/TEXT values
- Huge multi-row INSERT statements in dumps
- Low server or client limit
⚡ Quick fix
- Raise max_allowed_packet on the server (and client for imports)
- Split large inserts
- Store large files outside the database
Detailed fix by platform
MySQL
SET GLOBAL max_allowed_packet = 268435456; -- and in my.cnf [mysqld]
How to diagnose
- Size — How big is the statement/row?
- Limits — Server and client values
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026