Runbook
PostgreSQL database connection pool exhaustion and optimization
Back to Runbooks
Overview
This incident type refers to the situation where a PostgreSQL application experiences database connection pool exhaustion, leading to errors. This can happen when the number of database connections requested exceeds the maximum number of connections allowed in the pool. To prevent this issue, it is important to optimize database connections by properly configuring the connection pool settings and monitoring the usage of connections. This can help ensure that the application has sufficient resources to handle database requests without experiencing pool exhaustion.
Parameters
Debug
Check the current size of the PostgreSQL connection pool
Identify the maximum number of PostgreSQL connections allowed in the connection pool
Check the current number of open file descriptors on the system
Identify the number of connections allowed per client IP address
Check the current number of idle connections in the PostgreSQL pool
Check the current number of active connections in the PostgreSQL pool
The maximum number of connections allowed in the pool is set too low, leading to contention for available connections and eventual pool exhaustion.
Repair
Learn more
Related Runbooks
Check out these related runbooks to help you debug and resolve similar issues.