warninginc_20261026_3b8b4327 · 2026-10-26 17:28 UTC
PostgresConnectionsNearLimit on db-01
Resolved 17:35 UTC after 8 min
This alert on db-01: 23rd time in 30 days · usually over in 9 min · last 3 h ago
db-01: PostgreSQL connections at 90% of max_connections
Cause · from the AI investigation of the same fire (DatabaseConnectionsFull)
worker-01's
order-stats job started at 17:24:26 and opened about 35 connections to db-01, taking every free Postgres slot, so db-01 refused app-01 and app-02.The statistics agree: worker-01, TCP connections, opened as the database ran out of them 4 → 40, 2 min before the alarm.
What changed, earliest first
| Server | What changed | Before → after | Started | Size of jump |
|---|---|---|---|---|
| db-01 | CPU busy | 2.1% → 100% +98 points chart | 5 min before the alarm | huge |
| 3 servers db-01, app-01, app-02 same minute | database connection limit hit “[6-1] 2026-10-26 17:24:27.032 UTC [2717063] shop@shop FATAL: remaining connection slots are reserved for roles with the SUPERUSER attribute” |
0/min → 47–236/minchart | 2 min before the alarm | huge |
| 4 servers db-01, web-01, app-01, app-02 same minute | log lines per minute “postgres: [6-1] 2026-10-26 17:24:27.032 UTC [2717063] shop@shop FATAL: remaining connection slots are reserved for roles with the SUPERUSER attribute” new kind of line, 200/min (none in the hour before) (on db-01) |
2–3/min → 50–242/minchart | 2 min before the alarm | huge |
| db-01 | load per core | 0 → 17.3 +17.3 chart | 2 min before the alarm | huge |
| db-01 | memory used | 46.7% → 67.8% +21 points chart | 2 min before the alarm | big |
| shop.example.com raised no alert | website answering effect | 1 → 0chart | 2 min before the alarm | clear |
| worker-01 raised no alert | TCP connections, opened as the database ran out of them cause | 4 → 40 +36 | 2 min before the alarm | huge |
Investigation
Same fire as DatabaseConnectionsFull on app-01, app-02, db-01 (same cause, within 15 minutes): its AI write-up covers this one, so it was not paid for twice.
Alerts in this incident
- PostgresConnectionsNearLimit on db-01 17:27 UTC
Runbook
PostgreSQL is close to max_connections: soon new connections are refused. The investigation lists which application and user hold them, from PostgreSQL's own count.
- On the database:
SELECT usename, application_name, client_addr, state, count(*) FROM pg_stat_activity GROUP BY 1,2,3,4 ORDER BY 5 DESC; - One application holding most of them: a report job, a leak or a pool sized too big; fix that client before raising the limit.
Whyfire's starter runbook
Incidents like this before
- Earlier incidents like this are not part of this demo
Silenced before
- Never silenced in the last 6 months
Also started nearby
- WebErrorRateHigh on web-01 2 min before the alarm
- DatabaseConnectionsFull on app-01 2 min before the alarm
- DatabaseConnectionsFull on db-01 2 min before the alarm
- DatabaseConnectionsFull on app-02 2 min before the alarm
- WebsiteDown on shop.example.com at the alarm