Hibernate automatically reset mysql system variable max_allowed_packet to 1024

Description

I encounter below issue after the system running about the 1 month.

com.mysql.jdbc.PacketTooBigException: Packet for query is too large (1152 > 1024). You can change this value on the server by setting the max_allowed_packet' variable.

Then i set below value in mysql

SET GLOBAL max_allowed_packet=16777216;

and also in my.cnf also.
[mysqld]
max_allowed_packet = 16M

Restart the tomcat application server and mysql database server.

Then system running once again well.

But after some days i encountered the same problem.I check the the value
SHOW GLOBAL VARIABLES LIKE 'max_allowed_packet';

its reset to 1024 .I am shocked.No user or script change the value and also mysql not restarted or upgraded.So i think its the hibernate session that change this value.

I want to know does hibernate execute this type of query in background that changes the system variable max_allowed_packet ?

When would the hibernate changes the mzax_allowed_packet.I also file the same bug in mysql forum also.

Activity

Brett MeyerApril 28, 2015 at 2:16 PM

Please first ask these types of questions in the user forums. Open JIRAs only when there's a confirmed, concise issue in ORM 4 or 5, including a test case. Thanks!

Rejected

Details

Assignee

Reporter

Components

Affects versions

Priority

Created April 25, 2015 at 3:23 PM
Updated April 28, 2015 at 2:16 PM
Resolved April 28, 2015 at 2:16 PM