How can I solve the problem of MySQL too connector connections?

Source: Internet
Author: User

Refer to the followingArticle

Http://www.mysqlperformanceblog.com/2010/03/23/too-many-connections-no-problem/

 

Conclusion:

(1) MySQL will leave a connection for the Super User by default. You can use this reserved connection to log on and increase the number of connections. However, if all the connected users have the super permission, the reserved connection does not exist. In this case, you can use the following command to set the number of connections: GDB-p $ (cat data/mysql_sandbox5087.pid)-Ex "set max_connections = 5000"-Batch

(2) wait_timout indicates the number of seconds that a connection will wait before it is closed. Before that, the connection is not closed and the status is sleep. Therefore, this value must be set to a suitable small value, which can make the Connection Recycled faster.

(3) set global max_connections = 1500 to increase the maximum number of connections

(4) set global max_user_connections = 300, which is any givenMySQLThe maximum number of concurrent connections allowed by the account can prevent a user from having too many connections to MySQL.

(5) interactive_timeout: the number of seconds waiting for activity before the server closes the interactive connection (interactive connection is similar to a session connecting to MySQL in MySQL management tools)

 

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.