Solve the MySQL connection problem when the small bookstore network access: Too many connections

Source: Internet
Author: User

Open the network of frequently visited novels in the morning http://www.xiaoxiaoshuwu.com/ , Ben wanted to see if the novel was updated. But 650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0021.gif "alt=" J_0021.gif "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/53/26/wKiom1RlWf7RzMfXAAE912lsb0E859.jpg "title=" 11.png "alt=" Wkiom1rlwf7rzmfxaae912lsb0e859.jpg "/>

The number of site connections exceeds the number of database connections, and the number of allowed connections depends on max_connections Configuration Parameters . The default value is 100. If you need to support more connections, you should set a larger value for this parameter, in addition to Max_connections and Wait_timeout also have a great relationship. The larger the value of the wait_timeout, the longer the idle wait for the connection, which results in a greater number of current connections.


workaround:

1, virtual host users please contact the space provider to optimize mysql  server

2. Independent host users need to optimize the configuration of MySQL server for operation and maintenance personnel:

Modify the parameters in the MySQL configuration file (under Windows My.ini, Linux for my.cnf):

max_connections=
Wait_timeout =

If there is no corresponding value in the configuration file, you can add it yourself, the corresponding value should be based on the actual situation to decide to restart the MySQL service to take effect.


This article from "Crushlinux" blog, reproduced please contact the author!

Solve the MySQL connection problem when the small bookstore network access: Too many connections

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.