... Playbook #10

Too many Connections on DB

Excessive database connections can lead to performance degradation, resource exhaustion, and service disruptions. This playbook assists in identifying the root causes, such as slow queries or high traffic from application or batch servers, enabling prompt resolution

Check the current number of connections to the MySQL server
                              
mysql -u ${USERNAME} -p${PASSWORD} -e "SHOW STATUS WHERE `variable_name` = 'Threads_connected';"
                              
                            
Check the maximum number of connections allowed by the MySQL server
                              
mysql -u ${USERNAME} -p${PASSWORD} -e "SHOW VARIABLES LIKE 'max_connections';"
                              
                            
Check the current MySQL process list to see the active connections
                              
mysql -u ${USERNAME} -p${PASSWORD} -e "SHOW PROCESSLIST;"