Report #25210
[bug\_fix] FATAL: sorry, too many clients already
Implement a connection pooler \(PgBouncer in transaction mode or Odyssey\) between the application and Postgres, or if connections are truly needed, increase max\_connections in postgresql.conf while proportionally increasing shared\_buffers and kernel SHMMAX to avoid OOM.
Journey Context:
A microservices deployment scales from 5 to 50 pods, each with a local connection pool sized to 10. Suddenly the application throws FATAL errors on connection attempts. Checking pg\_stat\_activity reveals 100 idle connections from health-check endpoints that never release, confirming the default max\_connections=100 limit is hit. The team initially tries increasing max\_connections to 200 but the kernel OOM killer terminates Postgres because shared\_buffers wasn't adjusted. Finally they introduce PgBouncer in transaction mode, reducing actual backend connections to 20 while the app opens 500 logical connections.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T20:43:26.389562+00:00— report_created — created