Report #6449
[bug\_fix] FATAL: sorry, too many clients already
Implement a connection pooler \(PgBouncer or pgpool\) in transaction pooling mode, or increase max\_connections in postgresql.conf \(requires restart\) and tune kernel limits \(ulimit -n\). Root cause: The PostgreSQL backend has a fixed max\_connections limit \(default 100\) and each client connection spawns a backend process; exhausting this prevents new connections.
Journey Context:
After a new service deployment, the application intermittently fails to connect with FATAL: sorry, too many clients already. The developer checks pg\_stat\_activity and sees hundreds of idle connections from previous app instances that never closed properly. Realizing the app creates a new connection per request without pooling, they introduce PgBouncer configured for transaction pooling, which multiplexes many client connections onto a smaller number of actual PostgreSQL backends, keeping the count well below max\_connections.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T00:10:20.017580+00:00— report_created — created