Data Source rejected Establishment of connection, message from server: "too many connections"

Source: Internet
Author: User

Error description:

There was no problem in the test for a period of time. Today, the user suddenly cannot log on, and an error is reported, such as data source rejected Establishment of connection, message from server: "Too has connections"

Error cause:

Too many connections, too many login users, too many configured MySQL connections, or some connections are not closed, resulting in excessive connections.

Solution:

Modify the my. ini configuration file of MySQL. The online saying is: the number of concurrent connections set in my. ini under the MySQL installation directory is too small or the system is busy, resulting in the full number of connections.

While the project is actually deployed on the Linux system, you need to find the configuration file of my. CNF, which is usually in ETC/My. CNF. Find this file and add the following lines:

Set-variable = max_connections = 1000
Set-variable = max_user_connections = 500

Set-variable = wait_timeout = 200


Then restart MySQL to take effect.

Net stop MySQL

Net start MySQL

Max_connections: set the maximum number of connections

Max_user_connections: sets the maximum number of connections per user to 500.

Wait_timeout: the idle connection will be closed after 200 seconds, but the idle connection is not affected.

// Restart MySQL and run the following command to check whether the modification is successful.

# Mysqladmin-uroot-P Variables

Password:

// The following information indicates that the modification is successful.

| Max_connections | 1000

| Max_user_connections | 500

| Wait_timeout | 200


Summary:

What is the first response after a problem occurs?

0. First, you must first believe that you can solve this problem.

1. Check the log file on the server. The log contains the error information.

2. A. If this error has occurred before, first try to solve it in the previous way. B. If it is a new error, locate it based on the error prompt that you have never encountered. check whether there is an error or error on the error page. js starting with 5 is generally a server error, whether the data transmission format is incorrect or a URL request is faulty. 1 **: the request is received and processed. 2 **: The operation is successfully received, analyzed, and accepted. 3 **: the request must be further processed. 4 **: the request contains an incorrect syntax or cannot be completed. ***: the server fails to execute a fully valid request.

3. After locating the problem, try to narrow down the scope step by step, just as after losing the wallet, you should also perform further troubleshooting.




Data Source rejected Establishment of connection, message from server: "too many connections"

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.