Record a blood case caused by SELECT

Source: Internet
Author: User

1. The web server suddenly keeps RESTART. When querying LOGS, an error is reported when the web server calls an API;

2. Check the API. DWON is finished. Restart the API to restore it;

3. Check the api logs and find MYSQL exceptions;

4. top, found that MYSQL occupies 100-300% CPU ......

5. Continue tracing MYSQL and show processlist...

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/221941M95-0.jpg "title =" showprocesslist.jpg "/>


This SELECT statement takes 274565 s, resulting in more than one thousand threads in the waiting state. Bloody executors...

After confirming the SQL statement to the development, kill the id of the SQL statement and restore it to normal.

Last care!



Thanks for the ideas provided by grape and join ~~


Supplement:

A lot of response diagrams are too small to see clearly. The data in the attached big image is different from the previous one, but the format is the same .)

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/2219415129-1.png "title =" showprocesslist.png "/>

This article is from the "Wowking" blog, please be sure to keep this source http://wowking.blog.51cto.com/1638252/1243400

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.