Skip to main content
← All 10 Production Configurators
DATABASES · PGBOUNCER.INI · LIVE MISCONFIGURATION PHYSICS

PgBouncer Transaction Pooling Configurator

Size PgBouncer max_client_conn, default_pool_size, query_wait_timeout, and max_prepared_statements for PostgreSQL 16 without pool starvation or LWLock thrashing.

Healthy 40× Transaction Multiplexing
1000 app clients cleanly multiplexed onto 25 Postgres backends with 4s fail-fast queue cap.
REAL-WORLD KNOBS (5)
Transaction mode releases the Postgres backend immediately on COMMIT, achieving 10–25× multiplexing.
1000
Total TCP connections accepted from FastAPI/Node/Go pods.
25
Actual Postgres backend connections per DB. Sweet spot: ~2×–4× DB vCPUs (20–40).
4s
Fail fast when the pool saturates instead of stalling callers indefinitely.
300s
Reclaim idle Postgres backend memory during low-traffic windows.
pgbouncer.ini · PARSER-VERIFIED
[databases]
app_prod = host=postgres-primary.internal port=5432 dbname=app_prod

[pgbouncer]
listen_addr = 0.0.0.0
listen_port = 6432
auth_type = scram-sha-256
auth_file = /etc/pgbouncer/userlist.txt
pool_mode = transaction
max_client_conn = 1000
default_pool_size = 25
reserve_pool_size = 5
reserve_pool_timeout = 2
query_wait_timeout = 4
server_idle_timeout = 300
max_prepared_statements = 200
ignore_startup_parameters = extra_float_digits, search_path
EXPLORE THIS COMPONENT IN ARCHOS STUDIO
Simulate Full Topology in ArchOS ↗60-Sec L4–L7 Diagnostic →
MATCHING PRODUCTION INCIDENT PLAYBOOKS
M02 · P0 · L6PgBouncer cl_waiting Queue Saturation & Little’s Law Pool SizingRead Incident Playbook →