1、列出所有非sleep进程,发现执行时间较长的进程,定位哪个应用导致的
SELECT * FROM information_schema.PROCESSLIST WHERE command != 'Sleep' ORDER BY time DESC
2、杀死time时间比较高的线程语句,暂时恢复
- select concat('kill ', id, ';') from information_schema.processlist
- where command != 'Sleep'
- and time > 100
- order by time desc
3、恢复正常后,排查慢SQL
4、也有可能需要升级升级内核小版本