Skip to content
Back to the playbook

Diagnosing Postgres connection exhaustion (too many clients already)

PostgreSQLrevision 1

Diagnostic tree

  1. In progressNew connections are being refused with 'too many clients already'Postgres has a hard `max_connections` ceiling; once every slot is in use, every further connection attempt is rejected at the protocol level, before authentication even completes.
View the whole map (8 more steps)
  • Check whether you're actually at max_connections
  • Check for connections stuck idle in an open transaction
  • Not actually at the connection limit
  • Application code is leaving transactions open
  • Genuine concurrency is exceeding max_connections
  • Free the stuck connections, then stop the leak
  • Confirm there's real headroom again
  • Resolved

What to test

New connections are being refused with 'too many clients already'

Postgres has a hard `max_connections` ceiling; once every slot is in use, every further connection attempt is rejected at the protocol level, before authentication even completes.

What happened?