Postmortem · Sunday, Oct 25, 2026
A queue behind one database lock took the platform down for seven hours
- Started
- 07:07 UTC
- Sunday, Oct 25, 2026
- Ended
- 17:50 UTC
- Sunday, Oct 25, 2026
- Duration
- 10 h 43 min
- From the first failure to recovery
- Worst
- Full outage
- 6 h 56 min, 07:12 – 14:08
At 07:07 one network began registering new clients, the identities its apps and devices use on our network, faster than a database lock let them through. Every waiting registration held one of the database connections our servers share, and within five minutes there were none left for anything else: signing in, finding providers and starting connections failed for nearly everyone, and new contracts fell from about 580 a second to about 2. We traced the queue to that one lock by 07:50, but the investigation stopped at 07:55, and nothing resumed it or alerted us until a team member's app could not connect, six hours later. Cancelling the queued registrations cleared the queue at 14:08. Then a bug in the library our servers use to reach the cache turned one slow cache node into tens of thousands of stuck connections, and most new connections through our hosted proxy service failed until 17:50, as the fixed library rolled out. At the same time, failed contract requests were piling up in the service, each retrying its cleanup for up to five minutes: the retry storm we recognized only after the Oct 26 outage.
TimelineAll times UTC
- Healthy
- Degraded
- Partial outage
- Major outage
- Full outage
New contracts per second: the readings
| Time (UTC) | New contracts per second |
|---|---|
| 07:06 | about 580/s (before the outage) |
| 07:07 | 394/s |
| 07:12 | 38/s |
| 14:05 | about 2/s (the rate for most of the outage) |
| 14:53 | about 240/s (and rising) |
| 16:14 | about 395/s |
- Full outage6 h 56 min
- Partial outage2 h 54 min
- Degraded53 min
Phases
- 07:07 – 07:12Partial outage5 minOne network's queued registrations took most of the database connections, and new contracts fell by a third.
- 07:12 – 14:08Full outage6 h 56 minSigning in, finding providers and starting connections failed for nearly everyone; new contracts fell to 38 a second, then about 2.
- 14:08 – 15:01Degraded53 minSigning in and new connections worked again as apps came back; by 14:53 new contracts were at about 240 a second and rising.
- 15:01 – 17:50Partial outage2 h 49 minMost new connections through our hosted proxy service failed, while the apps worked normally.
Key moments
- 07:07Registrations from one network start to queue behind a database lock, each holding a database connection while it waits. New contracts fall by a third.
- 07:12The waiting registrations hold nearly every database connection. Signing in, finding providers and starting connections fail for nearly everyone.
- 07:46We notice the collapse while measuring an unrelated rollout, and pause the rollout. An alert for slow contracts had been firing since a slowdown earlier that morning, so no new alert fired.
- 07:50We trace the queue to a single lock: one holder and about 530 registrations waiting behind it.
- 07:55The investigation stops on an error. Nothing resumes it, and nothing alerts us.
- 13:53Work resumes after a team member's app can't connect.
- 14:03We start cancelling the registrations queued on that one lock. The network retries 75 times a second, so the queue holds until a faster loop from 14:05 empties it at 14:08.
- ~15:01A cache node slows down, and connections to it start failing and piling up. Failed contract requests pile up in our hosted proxy service too, and its new connections fail.
- 16:09The lock fix starts rolling out: database work gives up waiting for a lock after 2 seconds, and registrations wait their turn outside the database.
- 17:10We find the second cause, a bug in the cache library. The fixed library rolls out from 17:26, and the hosted proxy service is back to normal at 17:50.
Who was affected
People using the apps. From 07:07 to 14:08, signing in, finding providers and starting a connection failed for nearly everyone. Connections that were already open were not dropped.
Hosted proxy customers. Down with everyone else from 07:07 to 14:08. Then from about 15:01 to 17:50, most new connections through our hosted proxy service failed: it completed between a tenth and two-fifths of its usual rate of new contracts, while 550 to 1,154 contract requests a second failed.
Providers. Providers stayed connected throughout.
Data. No data was lost. Requests that failed or that we cancelled were rolled back, and a retried registration picks up where it left off.
What went wrong
One network's registrations queued inside the shared database pool
So that one network's registrations can't collide, the server lets them through a database lock one at a time. One network was registering new clients faster than the lock let them through. Each waiting registration held a database connection from the connection pooler, which shares database connections between our servers, and 570 to 590 waiting registrations held nearly every connection it had. Every other request, from signing in to new contracts, then timed out waiting for a connection, while the database itself sat nearly idle.
Abandoned requests kept the queue from draining
Nothing limited how long a request could wait for a lock. When a waiting request's caller gave up, the request could still be granted the lock in its turn, and it then held the lock for 20 to 25 seconds before the server cleaned it up. The lock passed on about once every 20 seconds while new registrations kept arriving, so the queue could never drain on its own.
The investigation stopped, and nothing alerted us
We found the stuck lock within 45 minutes, but the investigation stopped on an error at 07:55, and nothing resumed it for six hours. An alert for slow contracts had been firing since a slowdown earlier that morning, so the collapse raised no new one. Nothing watched the database pool continuously, and no alert reached us. We learned the platform was still down when a team member's app could not connect. Once work resumed, finding the exact lock and clearing it took 15 minutes.
A cache library bug turned one slow node into thousands of stuck connections
After the database recovered, one of our cache nodes slowed down, and connection attempts to it began timing out. The open-source library our servers use to reach the cache had a bug: whenever a connection attempt failed, it left the network connection open. The open connections piled up into the tens of thousands, the node hit its connection limit and refused more, which made still more attempts fail, and our hosted proxy service ran out of the local network ports it needs to reach that node. An alert for a spike in one node's connections existed, but nothing was running it. Our first diagnosis, that connection pools had grown, was wrong, and restarting the proxy service freed its connections only until the leak refilled them, within minutes. It ended only when every service ran the fixed library.
A retry storm we didn't recognize ran at the same time
We found only after the Oct 26 outage that the same retry storm had run here. From about 14:45, each failed contract request in our hosted proxy service retried its cleanup for up to five minutes, and the failed requests piled up to 188,000 by 16:00 before draining by 18:00. We took the failures for the cache library's alone. The checks we added after Oct 26 would have flagged the storm at 14:49.
What we changed
Each fix links to the public commits that made it. Changes to our servers' configuration are described without links.
- DoneDatabase work now gives up waiting for a lock after 2 seconds and frees its connection at once, instead of taking the lock after its caller has gone. Registrations wait their turn in each server's memory, so a busy network can no longer fill the pool.
- urnetwork/server · 7962a8d ↗Bound every main-pool transaction's lock waits and gate registrations per network
- DoneA lock timeout is answered with "try again in a second" instead of an error. The few database jobs that need to wait longer have limits of their own, and background writes wait at most half a second behind a lock, then try again later.
- urnetwork/server · adf5d5e ↗Keep long lock waits where they belong and answer lock timeouts as retryable
- DoneEvery service runs the release of the cache library that fixes the bug, with a test that fails if a failed connection attempt ever leaves a connection open again.
- urnetwork/server · 78f9401 ↗Close the sockets of failed Redis handshakes (go-redis v9.23.0)
- DoneThe cache scripts that kept one node busy for tens of milliseconds at a time now work in small, bounded steps.
- urnetwork/server · 09396cf ↗Bound the Redis work of shared egress addresses, score pages and drains
- In progressNew alerts for a cache node that refuses connections and for services whose cache connections time out. They are written and start paging once our continuous monitoring is rebuilt.
- urnetwork/server · 0644102 ↗Page on Redis refused connections and service pool distress
- DoneA failed request's cleanup now gives up after 5 seconds instead of five minutes, and each hosted proxy process runs at most 256 contract requests at once. Both came with the Oct 26 outage.
- urnetwork/server · 6ba9d88 ↗Bound contract compensation cleanup to 5 seconds
- urnetwork/server · 88117cc ↗Bound the contract creations a proxy process runs at once
Still open
- OpenContinuous checks that page us when database requests queue behind one lock or time out waiting for a connection, and incident response that doesn't stop when one investigation is interrupted.
- OpenMake sure the apps and our SDK back off when the server asks them to try again later, instead of retrying many times a second.
- OpenChange the order in which registration takes its locks, so a queue of registrations can't hold up sign-outs, password resets or account deletion in that network.
- OpenTake two more steps out of the time registration and sign-in hold database locks, so a busy network or a slow cache can't stretch them.
Corrections
- Oct 29Added a second cause of the hosted proxy failures from 15:01 to 17:50: the retry storm behind the Oct 26 outage was running here too, which we found only afterwards. Its fix is now listed under what we changed.