An unibilling machine suddenly experienced heavy loads a few days ago. it is found that cpu usage is high in top. the agi program runs slowly and a zombie process occurs. in fact, there were only about 50 concurrent calls at that time. far below normal standards. the problem of restarting the machine was not solved. very strange.
Considering that mysqld occupies the most resources in top, you can log on to the mysql console and run the show processlist command to find that the information of a process is special:
User "unauthenticated user"
Command "connect"
Is State "reading from net" a hacker attacking my machine from the internet? Apparently not, because the Host column displays "localhost ".
No way. I found this problem on google. It cannot be considered a mysql bug because I can solve it by changing the configuration file/etc/my. cnf.
Specifically, add skip-name-resolve to the mysqld column.
[Mysqld]
Skip-name-resolve
Note that skip-name-resolve can disable dns resolution. However, you cannot use the host name in the mysql authorization table. You can only use the IP address. in the past, if you used localhost to create a mysql user, you must use 127.0.0.1 to add the user in the grant statement.
Then, restart mysqld.
Author: OurMySQL