PostgreSQL

Connection exhaustion prevents new client connections

critical
Connection ManagementUpdated Feb 12, 2026

Each PostgreSQL connection consumes 5-10MB RAM via fork model. At 200 connections: 1-2GB RAM overhead before queries run. At 500+ connections: excessive context-switching dominates query execution time. Database becomes unresponsive under concurrent load.

Technologies:
How to detect:

Active connections approach or exceed max_connections limit. Alert at 80% of max_connections. Critical when connection count reaches 95% or connection attempts fail with 'too many clients' error.

Recommended action:

Deploy PgBouncer connection pooler between application and PostgreSQL. Configure transaction-mode pooling with default_pool_size=20 actual database connections, max_client_conn=1000 application connections. Monitor active connections vs max_connections — alert at 80% utilization. Configure query_timeout=30s to prevent connection starvation. Review application connection management for leaks.