A live demo of yasp, the self-hosted status page.Explore the dashboard →
YASPYASPAcme status
Back to Acme status

API errors and a slow website

Major

Postmortem

What happened

A schema migration on the primary database took a lock on the accounts table, which the API reads on every request. Requests queued behind the lock until they timed out, and about a third of them failed for 70 minutes.

Why it wasn't caught

The migration ran in seconds on staging, which has a fraction of production's rows. Nothing checked how long it would hold the lock.

What we're changing

  • Migrations now run with a lock timeout and retry instead of waiting.
  • Large tables are migrated in batches, outside peak hours.
  • An alert fires when API error rates pass 5% for two minutes, not ten.

Updates

Resolved

Everything has been normal for 50 minutes. A postmortem follows.

Monitoring

Error rates are back to normal. We're watching the API while the migration is rescheduled.

Identified

A database migration locked a table the API reads on every request. We've stopped the migration.

Investigating

About a third of API requests are failing with 503 errors, and the website is loading slowly. We're investigating.