Recently, I found that two MySQLserver instances were suddenly worried at noon (suddenly) and were continuously suspended. Restarting mysql also fails. You can only view the errorlog of mysql.
Recently, I found that two MySQL servers suddenly went viral at noon (suddenly) and kept failing. Restarting mysql also fails. You can only view the errorlog of mysql.
Recently, I found that two MySQL servers suddenly went viral at noon (suddenly) and kept failing. Restarting mysql also fails. You can only see information similar to the following:
Forcing close of thread 12232 user: 'root'
Use mysqladmin to easily monitor mysql:
Mysqladmin-uroot-p ******** status-I 1
It is found that Queries per second avg is only about 200, which can be said to be very low, but Threads is indeed very unstable, and it will actually upgrade more than 200 instantly. In general, this thread value will not be higher than 5 single digits!
Then continue reading
Mysqladmin-uroot-p ********* processlist
Is there a large number of unauthenticated users ?? The following situations
+ ------ + ----------- + --------- + ---- + --------- + ------ + ------- + ------------------ +
[Root @ app028 ~] # Mysqladmin-uroot-p ************** processlist
+ ------ + ----------- + --------- + ---- + --------- + ------ + ------- + ------------------ +
| Id | User | Host | db | Command | Time | State | Info |
+ ------ + ----------- + --------- + ---- + --------- + ------ + ------- + ------------------ +
| 2007 | unauthenticated user | 192.168.4.29: 58519 | Connect | login |
| 2008 | unauthenticated user | 192.168.4.29: 58553 | Connect | login |
| 2009 | unauthenticated user | 192.168.4.29: 58571 | Connect | login |
| 2010 | unauthenticated user | 192.168.4.29: 58577 | Connect | login |
| 2011 | unauthenticated user | 192.168.4.29: 58579 | Connect | login |
| 2012 | unauthenticated user | 192.168.4.29: 58589 | Connect | login |
Google,
MySQL finds that this is a bug in MySQL. no matter whether the connection is through hosts or ip address, MySQL will reverse query the DNS and IP address to the DNS, because the reverse query speed is too slow (no matter whether it is a problem with the dns server provided by the isp or other reasons), a large number of queries are hard to cope with, and threads are increased when they are not enough, but it cannot be released, so MySQL will be "suspended ".
The solution is simple. End the reverse lookup process and prohibit any parsing.
Open the mysql configuration file (my. cnf) and add a line under [mysqld:
Skip-name-resolve
Reload the configuration file or restart the MySQL service.
Another example: