Runbook

MySQL too many connections incident

Back to Runbooks

Overview

This incident type occurs when the number of concurrent connections to a MySQL database server exceeds the configured limit of 80%. This can lead to performance degradation or even database server crashes, making the application or system that relies on the database server unavailable for the end-users. This type of incident typically requires immediate attention and resolution to restore normal operation of the affected service.

Parameters

Debug

Check MySQL server status

Check the current number of connections to the MySQL server

Check the maximum number of connections allowed by the MySQL server

Check the current MySQL process list to see the active connections

Check the system load average and CPU usage

Check the available memory and swap usage

Check the disk space usage

Check the MySQL slow query log

Check the MySQL error log

Repair

Define variables

Check if the MySQL configuration file exists

Replace the max_connections parameter in the MySQL configuration file

Restart the MySQL service to apply the changes

Identify and terminate idle connections to the database server to free up resources for other connections.

Learn more

Related Runbooks

Check out these related runbooks to help you debug and resolve similar issues.