The server has recently seen a MySQL Cpu too high a failure, the process is as follows:
The code is as follows |
Copy Code |
Login to Mysql #mysql-U root-p Querying the currently executing SQL statement Mysql>show full processlist; |
Then based on the results of the query to locate the problem, and then it can be resolved.
This allows us to analyze the CPU based SQL and then optimize the database or optimize the SQL
There is another way is to modify the MySQL wait time wait_timeout This can also be resolved, but pay attention to your site to speed various factors, do not cause the Web page did not open MySQL stopped
Wait_timeout:
The number of seconds the server waits for action on a connection before closing it. The default value is 28800, and I'll change it to 7200.
Note: Parameters can be adjusted by modifying the/etc/my.cnf file and restarting the MySQL implementation