Database Connection Pooling: Why Your App Runs Out of Postgres Connections, and How PgBouncer Helps
Why Postgres connections run out, how to do the math, and how to fix it with app-side pools and PgBouncer in transaction mode, plus the settings and gotchas that matter.