A serverless app opens thousands of short-lived connections and is exhausting an Azure Database for PostgreSQL flexible server. What's the built-in fix?
- A Enable the built-in PgBouncer and connect on port 6432 (correct answer)
- B Raise
max_connectionsto the highest allowed value - C Add read replicas
- D Move the server to the Burstable tier
Shortcut: Too many PostgreSQL connections = built-in PgBouncer on port 6432. Raising max_connections costs memory for every connection, read replicas don't reduce connection churn on the primary, and the Burstable tier has less capacity.
Flexible server includes PgBouncer, a connection pooler on port 6432 that shares a small pool of database connections among many clients. Raising
max_connections costs memory for every connection, read replicas don't reduce connection churn on the primary, and the Burstable tier has less capacity.