While uploading some large images into Liferay's document library, I received the following error:
ERROR [JDBCExceptionReporter] Packet for query is too large (6146352 > 1048576). You can change this value on the server by setting the max_allowed_packet' variable.
To get around this, you need to increase MySQL's max_allowed_packet variable. Edit the .ini or .cnf (depends on the setup you have) file that is read by mySQL.
Add in the line
max_allowed_packet=32MB
under the value of
[mysqld]
save the file
shut down the mySQL server
then start the mySQL server
login to mysql and type
mysql> show variables like 'max_allowed_packet';
you should get something like:
+--------------------+---------+
¦ Variable_name ¦ Value ¦
+--------------------+---------+
¦ max_allowed_packet ¦ 33553408 ¦
+--------------------+---------+
Please sign in to flag this as inappropriate.