ERROR 1040 (HY000): Too many connections.
Connection count hit max_connections; usually a leak or a traffic spike.
SELECT SUBSTRING_INDEX(host,':',1) AS ip, COUNT(*) FROM information_schema.processlist GROUP BY ip ORDER BY 2 DESC;SHOW VARIABLES LIKE 'wait_timeout';SET GLOBAL max_connections = 300;Use a pooler and alert at 70% of max_connections.
Spinning up a fresh box to reproduce or escape this error?
Managed cloud hostingNinjaOps publishes free engineering guides. Some outbound links are affiliate links: they cost you nothing and support the site.
Last reviewed 2026-10-02 · NinjaOps SEO grid · DevOps blog