Mysql thread surge

Source: Internet
Author: User

My colleague reported that the system could not log on to the background, and reported that the system could not connect to the database. I immediately checked that the number of connections had reached 1000, and the number of connections had been fully occupied.
In order not to affect other applications, increase the number of connections first.
Set global max_connections = 2000;
Check the connection again and find that the connection is like this.
| 16472659 | unauthenticated user | 192.168.100.11: 55282 | NULL | Connect | NULL | login | NULL |
| 16472660 | unauthenticated user | 192.168.100.11: 55284 | NULL | Connect | NULL | login | NULL |
| 16472661 | unauthenticated user | 192.168.100.11: 55290 | NULL | Connect | NULL | login | NULL
 
Google output is:
The explanation in the following manual is: unauthenticated user refers to a thread that has become associated with a client connection but for which authentication of the client user has not yet been done. Meaning: A thread is processing the client connection, but the client has not passed user verification.
Possible causes include:
1. The server is doing DNS response resolution. There are two solutions:
1) Add the Client ip address in hosts, as shown in figure
192.168.0.1 yejr
2) Add a skip-name-resolve parameter to the MySQL startup parameter, that is, do not enable DNS response resolution.
2. The server thread is still in the queue state, so you can increase the back_log
My authorization table uses IP addresses and domain names. You cannot restart the mysql service. You can only add the hosts record 192.168.100.11 webserver.
Still connection error. This time, it is reported that the webserver cannot connect to 192.168.100.11. You can only re-Add the authorized table host name to webserver.
Flush privileges;
Flush hosts; all are required.

Author "king"

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.