Error: Packet for Query is Too Large
Issue
The following dashboard alert appears in the source database:
Packet for query is too large. You can change this value on the server by setting the 'max_allowed_packet' variable.
Environment
Connector: MySQL
Resolution
You need to set the max_allowed_packet
variable to accept the higher value.
Do the following:
Check the current value of
max\_allowed\_packet
in your source database by running the following query:SHOW VARIABLES LIKE max_allowed_packet;
Increase the value to 16 M or 32 M (higher if required) by running the following query:
$> mysql --max_allowed_packet=32M
For more information, see MySQL's documentation.
Cause
A communication packet can be a single SQL statement sent to the MySQL server, a single row that is sent to the client, or a binary log event sent from a primary replication server to a secondary. The size of the data packet sent from your database exceeds than the size limit set at the source. The default max_allowed_packet variable
value is 1 MB.