INC-2291 — Checkout timed out for 38 minutes
- Duration
- 38 min
- Failed checkouts
- 1,204
- Time to detect
- 6 min
- Time to mitigate
- 31 min
A connection-pool setting that had been wrong for eleven months became load-bearing when a cache in front of it was removed. Checkout held database connections for the whole request instead of releasing them after the write, and once the cache stopped absorbing reads, the pool was exhausted in under two minutes. Nothing in the deploy that triggered it was wrong; it removed the thing that had been hiding the fault.
Timeline (all times UTC)
-
Cache removal deployed
A planned change: the read-through cache in front of
orderswas removed because it was serving stale totals. Reviewed, staged, no alarms. -
First checkout timeouts
Error rate on
POST /checkoutgoes from 0.2% to 31% in ninety seconds. No page yet: the alert threshold was a five-minute average. -
Paged
Six minutes after the first failure. The five-minute window is what cost most of that.
-
First wrong theory
Nine minutes spent on the payment provider, because their status page had an unrelated advisory open. It was not them.
-
Pool saturation found
pg_stat_activityshowed 100 of 100 connections held by checkout, most of them idle in transaction. -
Cache restored, service recovers
Rolled the deploy back rather than tuning the pool under load. Error rate back under 1% within two minutes.
Checkout error rate
POST /checkout. The dashed lines
are the first failure and the rollback.Why it took 31 minutes to mitigate
The fault was visible in one query from the moment it started. What cost the time was ordering: the payment provider had an open advisory that had nothing to do with us, and it was the first thing anyone looked at because it was the only thing already on a screen. Nine of the thirty-one minutes went there.
The pool setting itself — max_connections=100 against a service that holds
a connection for the whole request — had been wrong since the service was written. It
never mattered while the cache absorbed the reads. This is not a deploy that broke
something; it is a deploy that stopped hiding something.
Actions
| Action | Owner | Due | State |
|---|---|---|---|
| Release the connection after the write, not at end of request | Payments | 11 Sep | Done |
| Alert on a one-minute window, not five | Platform | 8 Sep | Done |
| Pool-saturation panel on the checkout dashboard | Platform | 18 Sep | Open |
| Load test that runs with caches disabled | Payments | 2 Oct | Open |