A communication packet is a single SQL statement sent to the MySQL server. The largest packet that can be be sent to Mysql server is 1GB. When the mysql server receives a packet bigger than the max allowed one it shows an error as below.
MySQL said: Documentation
#1153 – Got a packet bigger than ‘max_allowed_packet’ bytes
At times you might loose connectivity with mysql server if the packet is too large. Both client & server has a threshold of max packet size, so if you want to handle big packets, you must increase the variable limits on the server.
# vi /etc/my.cnf
You can increase the limit as per your requirement. Now we will set it to 16MB. Below is what you need to add in the mysql config file.
Save the file & exit. Restart mysql.
You can check the increased limit with command.
# mysqladmin variables | grep max_allowed_packet