Report #78853
[bug\_fix] FATAL: sorry, too many clients already \(max\_connections reached\)
Implement a connection pooler like PgBouncer in transaction mode, or increase max\_connections in postgresql.conf if memory permits. Root cause is each client connection forks a backend process consuming ~10-50MB RAM, exhausting the default 100 limit.
Journey Context:
Deployed new microservices and suddenly seeing FATAL errors under load. Checked pg\_stat\_activity and saw 100 idle connections from previous requests not being closed properly. Realized application was creating new connections per request without pooling. Installed PgBouncer with default\_pool\_size=20 and max\_client\_conn=10000, errors disappeared immediately.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T14:57:04.204878+00:00— report_created — created