--- title: MySQL Connection Pool Runbook keywords: [MySQL connection pool, pool exhausted, max_connections, HikariCP] summary: Diagnose exhausted MySQL connection pools and distinguish application leaks from database limits. category: database source: mysql-connection-pool breadcrumb: Database > MySQL > Connection Pool kb_scope: rag-eval covers: [mysql, connection pool, database capacity] when_to_retrieve: Use when MySQL clients report exhausted pools, connection acquisition timeout, max_connections pressure, or HikariCP saturation. --- # Database ## MySQL ### Connection Pool When MySQL connection pool is exhausted, first compare application pool usage with database `max_connections`. For HikariCP, check `active`, `idle`, `pending`, and connection acquisition timeout metrics. Recommended diagnosis: 1. Verify whether HikariCP active connections stay near maximum while pending threads grow. 2. Check MySQL `Threads_connected`, `Threads_running`, and `max_connections`. 3. Inspect slow SQL and long transactions that keep connections checked out. 4. If the database is healthy, look for application connection leaks or missing transaction boundaries. Use this runbook as evidence for connection pool, max_connections, and HikariCP incidents.