1. Problem Description
2. Solution
====================================== Lili's line ========
1. Problem Description
The project is deployed on the server and runs properly. However, after waking up the next day, Tomcat is automatically disabled. Check the Tomcat log and find that the Tomcat server is closed after more than eight hours...
I searched the internet for the root cause, which is basically the same answer. MySQL automatically closes the service eight hours later. the project uses the SSH framework. hibernate 3.0 does not automatically check whether the MySQL link is valid. therefore, if no one accesses MySQL within 8 hours, the link becomes invalid. If another user accesses MySQL, Tomcat is automatically disabled to prevent memory overflow.
Here, it is nothing more than modifying the project or extending the expiration time of the link for modifying MySQL.
====================================== Lili's line ========
2. Solution
1. Modify the link expiration time of MySQL, find the MySQL my. ini file. Open it, and add the following at the bottom:
[Mysqld] wait_timeout = 31536000interactive_timeout = 31536000
Note: The unit here is second. The default value is 28000 (8 hours)