ChiselOps

Case 04 · incident review

The migration that hung overnight

A team of fifteen. A night release launched a schema migration, which took a lock on a hot table - and the service stalled for one hour and forty minutes. No data was lost.

The fourth case. It is the review of one incident, not a before-and-after of the whole practice.

Timeline

Local time. Every row is backed by a log, not by anyone’s memory.
TimeWhat happened
23:14Release started, a schema migration launched straight after
23:17The migration took a lock on the orders table
23:22Write requests queue up, response time climbs
23:31An alert on response time wakes the on-call
23:58“Wait or roll back” is unclear: the migration has no timeout and the lock is invisible
00:40The migration is aborted by hand, the lock is released
00:54The service recovers, the release is rolled back

Cause

The cause was not the migration itself but three missing limits. The migration statement had no timeout, so it waited for the lock indefinitely. The release step had no timeout, so the pipeline did not stop on its own. And nothing showed what was actually holding the lock, so for forty minutes the on-call could not tell “wait one more minute” from “this is stuck”.

What we changed

Each change has an owner and a deadline; the deadline is checked at the next review.
ChangeOwnerDeadline
A statement timeout on migrations (30 s)team’s DB engineerby the next release
A timeout on the release step and an automatic stopthe team2 weeks
A live-locks panel on the on-call dashboardthe team3 weeks
Rehearsing the migration rollback in the quarterly drillthe teamquarterly

What worked correctly

The backups were intact and restores from them had been rehearsed, so no data was lost and nobody even had to think about it. The application rollback ran in its usual few minutes. We write this section separately in every review: without it, “let us redo everything” sweeps away the very mechanisms that saved the night.

Dates

Incident
night of 12–13 August 2026
Review
18–22 August 2026

How the service works is on the “Incident review” page; why a separate “what worked” section matters more than finding someone to blame is in the opinions.