1153 🐬 MySQL

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

  1. Raise max_allowed_packet on the server (and client for imports)
  2. Split large inserts
  3. Store large files outside the database

Detailed fix by platform

MySQL

  1. SET GLOBAL max_allowed_packet = 268435456; -- and in my.cnf [mysqld]

How to diagnose

  1. Size — How big is the statement/row?
  2. 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.