... Playbook #11

Unusual Drop in Select Queues on DB

When the volume of transactions significantly decreases, it may indicate underlying problems such as application failures, database misconfigurations, or network issues. The playbook helps in identify the reason like long running querues or locaked tables.

Get system health
                              
dmesg | tail
                              
                            
Active connections
                              
mysql -u ${USERNAME} -p${PASSWORD} -e "SHOW STATUS WHERE `variable_name` = 'Threads_connected';"
                              
                            
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}
                              
                            
identify long-running or poorly optimized
                              
mysql -u $MYSQL_USER -p$MYSQL_PASSWORD -h $MYSQL_HOST -P $MYSQL_PORT -D $MYSQL_DATABASE -e "SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST WHERE TIME > 60 OR Command = 'Query' ORDER BY TIME DESC;"