I am having a problem which I believe is related to the wait_timeout (8 hour) setting.
After 8 hours of inactivity I will get errors, typically with code "SQL Error: 0, SQLState: 08S01"
and a stack trace saying hibernate has lost connection to MySQL.
Seems from the forums that lots of people are having this problem.
In spite of having implemented many of the suggestions, I am still having the problem.
The problem is only occuring on my Hibernate connections.
All the Hibernate files, including the hibernate.cfg.xml were generated by the hibernate wizard in MyEclipse.
Here are the relevant settings I currently have in the <session-factory> in hibernate.cfg.xml:
Code:
<property name="autoReconnect">true</property>
<property name="removeAbandoned">true</property>
<property name="timeout">60</property>
<property name="minEvictableIdleTimeMillis">60000</property>
<property name="removeAbandonedTimeout">60</property>
I also noticed in the MySQL doc that it suggests making wait_timeout on the MySQL server longer.
I tried adding a wait_timeout property to the my.ini file (in various places) and restarting MySQL service, but when I do a SHOW VARIABLES wait_timeout still has the default 8 hour value.
How can I change wait_timeout on the Community edition?