... Playbook #12

Increase in threads on MYSQL

When the number of threads exceeds the capacity of the MySQL server to handle them efficiently, it can lead to slow query processing, timeouts, and even crashes. The plyabook helps indentify the reason for this increase including long running queries or increased traffic.

Get system health
                              
dmesg | tail
                              
                            
THREAD RUNNING
                              
ps -ef | grep mysql | grep -v grep | wc -l
                              
                            
Check MySQL processlist to see the running queries and threads
                              
mysql -h ${HOSTNAME} -u ${USERNAME} -p${PASSWORD} -e "SHOW FULL PROCESSLIST"
                              
                            
Last 100 Lines of Mysql slow uery log
                              
tail -n 100 ${MYSQL_SLOW_QUERY_LOG}