MySQL CPU high fault resolution

Source: Internet
Author: User

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

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.