3141
MySQLWARNINGNotableProtocolHIGH confidence

Row size exceeded allowed packet; skipped

Production Risk

Medium — silently skipped rows can cause incomplete application data.

What this means

During a result set transmission, a row was larger than the max_allowed_packet setting on the client or server. The row is skipped and a warning is issued rather than raising a hard error.

Why it happens
  1. 1A BLOB, TEXT, or JSON column contains data larger than max_allowed_packet.
  2. 2The client max_allowed_packet is set lower than the server setting.
How to reproduce
trigger — this will error
trigger — this will error
SELECT large_blob_col FROM t1;  -- when row exceeds max_allowed_packet

expected output

Warning (Code 3141): Row 1 was cut by GROUP_CONCAT(); set group_concat_max_len higher.

Fix 1

Increase max_allowed_packet

Increase max_allowed_packet
SET GLOBAL max_allowed_packet = 67108864;  -- 64 MB

Why this works

Allows larger rows to be transmitted without truncation.

Fix 2

Chunk large BLOB columns

Chunk large BLOB columns
SELECT SUBSTRING(large_blob_col, 1, 1048576) FROM t1;

Why this works

Fetches large values in smaller pieces within the packet limit.

What not to do

Sources
Official documentation ↗

MySQL 8.0 — 3141 ER_WARN_ALLOWED_PACKET_OVERFLOWED

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All MySQL errors