Incident Postmortem: INC-2026-089 — Checkout Webhook Queue Stall
- Severity: SEV-1
- Date: 2026-04-14
- Duration: 47 minutes (
14:12 UTC – 14:59 UTC)
- Incident Commander: Alex Rivera
- Status: Action Items In Progress
[!NOTE]
This is a blameless postmortem. We assume everyone acted with the best information available at the time and focus on improving systems, guardrails, and observability.
1. Executive Summary
Between 14:12 UTC and 14:59 UTC, payment confirmation webhooks stalled in the primary worker pool after a routine database index migration acquired an unexpected table lock on billing_events. 1,420 customers experienced delayed order confirmation emails and dashboard status updates; zero payments were lost or double-charged.
Impact Metrics
| Metric |
Value |
Baseline |
| Total duration |
47 min |
— |
| Affected webhook deliveries |
1,420 |
0 |
| Failed payment charges |
0 |
0 |
| Peak queue depth |
18,900 messages |
< 50 |
| Time to detect (TTD) |
6 min |
< 2 min target |
| Time to mitigate (TTM) |
41 min |
< 15 min target |
2. Incident Timeline (UTC)
| Time |
Event |
14:09 |
Deploy v2.48.0 starts, running migration 20260414_add_billing_idx.sql. |
14:12 |
CREATE INDEX (without CONCURRENTLY) blocks writes on billing_events. |
14:18 |
Alert fires: WebhookQueueDepthHigh > 5,000. On-call acknowledges. |
14:24 |
On-call identifies lock wait chains in pg_stat_activity; SEV-1 declared. |
14:31 |
Migration query terminated via pg_cancel_backend(); lock released. |
14:35 |
Worker pool scaled from 4 to 16 replicas to drain backlog. |
14:52 |
Queue depth returns below 100; webhook p95 latency normalizes. |
14:59 |
All delayed confirmations verified delivered; incident resolved. |
3. Root Cause Analysis (Fault Tree)
[Diagram]
Contributing Factors
- Missing
CONCURRENTLY keyword: The index migration was tested on staging (12k rows, < 1s) where locking was imperceptible, whereas production had 48M rows.
- No
lock_timeout guardrail: The migration runner used PostgreSQL's infinite default lock wait.
- Delayed alerting: The queue depth alert only triggered at 5,000 messages instead of alerting on consumer age (
oldest_message_age > 60s).
4. What Went Well vs. What Could Be Better
What Went Well
- Idempotent webhook handlers meant zero duplicate charges during backlog replay.
- Auto-scaling worker replicas drained 18,900 queued events in 17 minutes.
- Status page updates were published within 10 minutes of SEV-1 declaration.
Where We Got Lucky
- The incident happened outside peak evening traffic; at 3x volume, connection pool exhaustion would have affected checkout page loads as well.
5. Action Items
| ID |
Action Item |
Priority |
Owner |
Due Date |
Status |
AI-1 |
Enforce squawk SQL linter in CI to block non-concurrent index creation |
P0 |
Platform |
2026-04-18 |
Done |
AI-2 |
Set SET lock_timeout = '3s' and statement_timeout = '30s' in migration runner |
P0 |
Core Infra |
2026-04-19 |
In Progress |
AI-3 |
Add alert on webhook_oldest_message_age_seconds > 60 |
P1 |
SRE |
2026-04-22 |
Open |
AI-4 |
Add pg_locks contention widget to Payments Overview dashboard |
P2 |
Payments |
2026-04-26 |
Open |