MySQL connection too much lead to always die, and then online search found this article from a MySQL 5.x version, MySQL automatically closed the free connection features modified, if a connection idle to timeout (default 28,000 seconds 8 hours), Once again, the reconnect reconnection request is not accepted and a new connection needs to be established, which results in the SER's reconnection mechanism not working: Ser will only use the same connection interface when it needs to operate the database, and initiate a reconnection request if disconnected. And this problem can not be solved in the short term: ser: 1. Use MySQL 4.0 or 4.1, if you do not use some of the new features of MySQL 5 such as stored procedure triggers. 2. Restart the MySQL server or ser (as this issue may also affect other server programs that require MySQL support, so restart the MySQL server as well, But need to detect the MySQL server is not used in a time restart is more difficult to determine) 3. Set MY.CNF, there are mysqld fields add Parameters: [mysqld]port = 3306socket =/tmp/mysql.sockwait_timeout= 500000interactive_timeout = 500000 (500,000 seconds for approximately five or six days of timeout, depending on the actual need to select a database may be idle for the longest time a slightly larger time value.) Restart the mysqld application, or you can add the-o wait_timeout=500000 parameter to the same effect when the mysqld is executed. In the MySQL client show variable should be able to see the last one from the default wait_time=28000 into 500000. (may need to reboot if reboot mysqld has not been effective:)
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.