Forums

Home » Liferay Portal » English » Liferay Legacy

Combination View Flat View Tree View
Threads [ Previous | Next ]
Joshua Asbury
How to Increase max_allowed_packets in MySQL
August 11, 2007 12:47 PM
Answer

Joshua Asbury

LIFERAY STAFF

Rank: Expert

Posts: 497

Join Date: September 8, 2006

Recent Posts

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


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 ¦
+--------------------+---------+