Background: A large number of select queries were found in the test environment, and the load soared to 90 +
Troubleshooting ideas:
1 old rules, follow the wrong script to walk around, planning a few elements (1 for the library Access statistics 2 for the specific statement type of statistics), found that there are a large number of select queries
2 Consideration is because I did not go through the index caused by SQL heap, I explain a bit, very fast.
3 then come to the conclusion that the problem is caused by concurrency.
Problem solving:
1 since it is a concurrency problem, contacted the relevant developers, found that the MySQL front-end Redis hangs, resulting in a direct large number of queries hit the MySQL side, the load soared
2 Research and development stop the related query, problem solving
Summary: For the front-end MySQL cache to do this architecture, must also pay attention to, once the redis problem, a large number of queries will drag down MySQL itself. Troubleshooting is not only about MySQL itself.
This is my point of feeling
MySQL nineth article ~ Troubleshooting a MySQL case