Troubleshooting handbook
Find your symptom, confirm it with a query, then fix it. Every query is read-only.
| Symptom | Start here |
|---|---|
FATAL: sorry, too many clients already |
Too many connections |
| A query or page got slow | Slow queries |
| Queries hang, migrations never finish | Locks and blocked queries |
| Table keeps growing, autovacuum can't keep up | Vacuum and bloat |
| Warnings about transaction IDs, or "database is not accepting commands" | Transaction ID wraparound |
| Replica is behind, or a slot is retaining data | Replication lag and slots |
| Disk is filling up | Disk full and WAL growth |
Server killed, signal 9, out of memory |
Out of memory |
| High CPU or slow disk | High CPU and I/O |
| Old idle connections that never go away | Stale connections |
| A replica is lost, behind, or its queries get cancelled | Replication lag and slots |
| Growing fast, and unsure whether to tune, scale up or add a replica | When to scale |
Tools that help lists free tools for each problem, with install steps and when to run them. Each finding in a report links to the matching page. Run a checkup to see which of these apply to your database.