History

Document the 20-connection application pool

Rhys Sullivan committed 1 month ago

Commit d8a64df1 parent 24adb121 file · +6 −3Browse files

Unified · Split

apps/cloud/docs/database-connections.md+6−3
@@ -11,16 +11,19 @@ The connection budget is: · 10 unmodified lines
1111 | PostgreSQL max_connections | 50 |
1212 | PostgreSQL superuser_reserved_connections | 3 |
1313 | Local PgBouncer processes | 1 |
14−| PgBouncer default_pool_size | 12 |
15−| PgBouncer max_db_connections | 12 |
14+| PgBouncer default_pool_size | 20 |
15+| PgBouncer max_db_connections | 20 |
1616 | PgBouncer max_client_conn | 400 |
1717 | PgBouncer max_prepared_statements | 200 |
18−| Hyperdrive origin connection limit | 12 (soft limit) |
18+| Hyperdrive origin connection limit | 20 (soft limit) |
1919
2020 Hyperdrive's origin limit is advisory. PgBouncer's database limit enforces the
2121 backend budget across users of one database. The cap is per PgBouncer process:
2222 adding processes, databases, direct clients, or other poolers requires a new
2323 aggregate budget. Keep capacity for provider sessions, deploys and administration.
24+The 20-connection application budget leaves 27 ordinary slots for those clients
25+after the three superuser-reserved slots. This is a concurrency ceiling, not a
26+target for active queries; check CPU, queue waits and latency before raising it.
2427 Prepared statements require protocol-level support to remain enabled in PgBouncer.
2528
2629 The migration and membership-readiness scripts retry only the initial `SELECT 1`