postgres connection pool exhausted, too many clients
Postgres 15, a service using pgbouncer in transaction pooling mode. Under load the app starts erroring:
FATAL: sorry, too many clients already
remaining connection slots are reserved for non-replication superuser connections
pgbouncer shows max_client_conn hit. I don't understand why the pool is exhausted when each app instance only opens 20 connections. What's going on? Would love to understand the underlying reason.
4 replies