mysql resolves automatic disconnection for 8 hours of unused links

Source: Internet
Author: User

Today, operations colleagues reflect that the release of keywords is not very stable, point of no response. I went to the line to read the log, found that the database has no links, looked up the problem

About MySQL automatic disconnection the results are as follows: In MySQL, there are parameters set, when the database connection idle for a certain time, the server will be disconnected waiting time-out, the two parameters only one function. Which parameter is in effect, related to the connection parameter specified when the user connects, by default, Wait_timeout is used. I recommend that you modify both parameters to avoid causing unnecessary trouble. 2, modify the parameters of the default value of the two parameters is 8 hours. I tested to change these two parameters to 0, the result is unexpectedly, the system automatically set this value to 1. In other words, the value cannot be set to permanent.  I recommend adding three to the parameter value of 0, which will certainly meet our application requirements. www.2cto.com Modify Operation: Open/ETC/MY.CNF, add the following parameters below the attribute group mysqld: [mysqld]interactive_timeout=28800000wait_timeout=28800000 Added under windows in My.ini: interactive_timeout=28800000wait_timeout=28800000

mysql resolves automatic disconnection for 8 hours of unused links

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.