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
| Time | What happened |
|---|---|
| 23:14 | Release started, a schema migration launched straight after |
| 23:17 | The migration took a lock on the orders table |
| 23:22 | Write requests queue up, response time climbs |
| 23:31 | An 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:40 | The migration is aborted by hand, the lock is released |
| 00:54 | The 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
| Change | Owner | Deadline |
|---|---|---|
| A statement timeout on migrations (30 s) | team’s DB engineer | by the next release |
| A timeout on the release step and an automatic stop | the team | 2 weeks |
| A live-locks panel on the on-call dashboard | the team | 3 weeks |
| Rehearsing the migration rollback in the quarterly drill | the team | quarterly |
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.