Because there are Too many online mysql instances, the Too connector connections problem is often encountered. This problem is also the most common problem. The following describes the solutions to this problem based on your own experience.
When this problem occurs, the business has encountered a problem. In this case, the most important thing is to restore the business first, in addition, you must first obtain the show innodb status and show full processlist information to analyze the cause. The simplest way is to temporarily increase the number of connections so that you can log on to the server. In this case, the Too worker connections prompt appears during login. What should I do? At this time, you can write an endless loop on the master to connect to the master mysql to ensure that you can log on normally. The simple statement is as follows:
While true; do mysql-uroot-ppassword-S/tmp/mysql_3306.sock; done
Then, use the gdb tool to change the max_connections configuration in the memory. Use the following command to find the mysql process ID:
Gdb-p 21862-ex "set max_connections = 1000"-batch
Note: Do not set max_connections to be too large. If it is too large, the system memory may be exhausted.
After logging on to the system, you can use show full processlist to check what happened. Generally, SQL is blocked and kill the corresponding SQL. You need to analyze and locate the problem together with the development of a large number of requests in a short time.