PostgreSQLMaxConnections #
Meaning #
Alert is triggered when the number of connected clients is close to PostgreSQL limits.
Impact #
- Client won’t be able to connect
Diagnosis #
Check if the number of connections per user is relevant
SQL
SELECT usename, count(*) AS total FROM pg_stat_activity GROUP BY usename ORDER BY total DESC LIMIT 100;Tips: Grouping by
application_namemay help to more details
Mitigation #
Reduce number of clients
Increase
max_connections(check memory first!)