Incident Library

IL-0329 incident.io · 2025-04-09database

A routine migration left PGAudit stuck holding Postgres locks, causing intermittent timeouts and a 2-minute outage

The weekend before the incident, incident.io upgraded its database to Postgres 17 and turned off the PGAudit extension during the upgrade. After testing in staging succeeded, PGAudit was turned back on in production and checked to be working. On Wednesday 9 April at 14:16 UTC a routine migration that created an empty table and added an index interacted with PGAudit in an unexpected way: the extension became unresponsive while holding critical locks. The locked resources blocked other database operations, which showed as intermittent slowness across the dashboard, mobile app, Slack app and API. Killing the PGAudit processes failed because they did not respond to timeout signals, and further kill attempts also failed as timeouts rose.

The team then chose to restart the database to end the stuck process by force, accepting a short hard outage instead of further disruption. The primary database was down for just under 2 minutes, from 14:25 to 14:27 UTC, and no on-call alerts or escalations were dropped during that time. After service was restored, PGAudit was disabled and then removed entirely so that it could not be switched back on by accident. The cause of the interaction between the migration and PGAudit was still under investigation when the write-up was published.

Severity
–
Scope
Intermittent slowness and timeouts across the dashboard, mobile app, Slack app and API from 14:16 to 14:27 UTC, including a primary database outage of just under 2 minutes; on-call alerts and escalations kept working
Users affected
–
Region
–
Time to detect
–
Time to resolve
11m

Symptoms

On 9 April 2025 from 14:16 UTC, incident.io's dashboard, mobile app, Slack app and API became intermittently slow and requests timed out. Monitoring alerted the team soon after a routine migration began on the production Postgres database, and the incident ended with the primary database unavailable for just under 2 minutes, from 14:25 to 14:27 UTC.

The migration created an empty table and added an index. PGAudit, a Postgres extension for detailed logging of database activity and of changes to database structures and user permissions, stopped responding while it held critical database locks, and other database operations queued behind those locks. The first attempt was to kill the stuck PGAudit processes, but they ignored timeout signals, so the locks were never released and the timeouts kept climbing.

Symptom Lock contention or deadlockIntermittent timeoutsHigh latencyService outage

Root cause

Root cause Software defect

Component Database
Contributing factor –
Trigger
At 14:16 UTC a routine migration that created an empty table and added an index ran on the production database, where PGAudit had been re-enabled after the weekend upgrade to Postgres 17.

Detection

incident.io's monitoring alerted the team to the problem shortly after the migration started.

Remediation

Action items

Lessons

–

Sources

Related cases

Check your cluster for this

kubegap audits a Kubernetes cluster for conditions like the ones in this case, Database among them, read-only, from Claude Code or Codex. Its checks cite public reports like this one.

For AI tools and scripts

The API needs no key. The MCP server offers search_incidents, get_incident, list_incidents, get_topic and vocab; both are explained on API and MCP.