PrefectPostgreSQL

Connection count approaching max_connections limit

critical
Connection ManagementUpdated Mar 24, 2026
How to detect:

Active database connections approaching the max_connections PostgreSQL limit, risking connection exhaustion and preventing new clients from connecting.

Recommended action:

Implement connection pooling immediately. Check for connection leaks by identifying connections in 'idle' state for hours in pg_stat_activity. Reduce Prefect worker/agent connection counts. Monitor total vs active vs idle connections.