Postmortem · Sunday, Oct 25, 2026
Servers ran short of CPU as the network grew, slowing new connections for 19 hours
- Started
- 19:00 UTC
- Sunday, Oct 25, 2026
- Ended
- 14:07 UTC
- Monday, Oct 26, 2026
- Duration
- 19 h 07 min
- From the first failure to recovery
- Worst
- Degraded
- 19 h 07 min, 19:00 – 14:07
Our network has grown fast: 203,000 connected clients, the identities apps and devices use on our network, on Oct 26, against 67,000 on Oct 23. From about 19:00 on Oct 25, as evening traffic climbed, the servers that relay their traffic ran short of CPU. Starved servers held each database connection they borrowed for about 14 milliseconds where the database needed 1 to 2, so all 640 connections of the connection pooler, which shares database connections between our servers, were busy, and up to 11,462 requests waited for one. New connections slowed and some failed. A device needs a contract before it can send traffic through a provider, and until 03:30, 5.3% of the contracts our hosted proxy service asked for failed, up to 420 a second while server updates rolled out. No alert fired, and we found it at 02:25. A fix at 03:15 cut the failures by three quarters, and the queue drained at 14:07 on Oct 26, as limits on each service's database connections rolled out.
TimelineAll times UTC
- Healthy
- Degraded
- Partial outage
- Major outage
- Full outage
Requests waiting for a database connection: the readings
| Time (UTC) | Requests waiting for a database connection |
|---|---|
| 18:00 | 0 (before the outage) |
| 19:37 | about 112 (the queue starts) |
| 20:07 | 1,384 |
| 20:35 | 8,978 (a 5-minute peak) |
| 00:05 | 11,462 (the highest 5-minute peak) |
| 03:10 | about 3,900 (before the fix) |
| 03:26 | 1,509 |
| 06:00 | about 1,700 |
| 13:25 | 3,340 (5-minute average) |
| 14:07 | 147 (5-minute average) |
- Degraded19 h 07 min
Phases
- 19:00 – 14:07Degraded19 h 07 minNew connections and contracts were slower and some failed, most often for our hosted proxy service; after a fix at 03:15 the failures fell by three quarters, to a few a second, until 14:07.
Key moments
- ~19:00As evening traffic climbs, the servers that relay it run short of CPU. Requests start to queue for database connections, and new connections slow down.
- 20:47A planned server update rolls out during the slowdown. At about 21:10, as its old processes finish draining, their clients reconnect at once, and hosted proxy failures jump to 129 a second.
- ~23:00A second update drains four relay groups together from 22:44. Their clients reconnect at once, failed hosted proxy requests pile up retrying their cleanup, and failures peak at 420 a second.
- 23:32A routine check of our metrics sees the hosted proxy failures and takes them for the noise of the update. It doesn't look at the queue for database connections.
- 00:05The queue peaks: 11,462 requests are waiting for a database connection.
- 02:25The next check compares hosted proxy failures with the evening's and finds them rising, seven and a half hours after the slowdown began. No alert had fired.
- 02:30We find the database nearly idle, waiting on the servers that hold its connections, and trace the queue to servers starved of CPU and to the load balancer in front of the pooler.
- 03:15We fix the load balancer so that every worker takes its share of connections, and move the old workers' connections over by 03:25. Waiting requests fall from about 3,900 to about 1,500, and failures by three quarters.
- 05:53The pooler's reserve connections can now open before a waiting request is dropped.
- 13:29Limits on each service's database connections, and fixes that cut needless database work, roll out to our hosted proxy service. By 14:07 the queue has drained and failures are back to normal.
Who was affected
Hosted proxy customers. From 19:00 to 03:30, 5.3% of the 7.56 million contracts our hosted proxy service asked for failed, with peaks of 129 a second at 21:10 and 420 a second at 23:00, and by 02:30 a new contract took about 2 seconds. After the 03:15 fix, failures fell by three quarters, to a few a second, and stayed there until 14:07.
People using the apps and our API. Connections that were already open kept working, and the number of connected clients kept rising. New connections were slower, and until 03:30, 0.6% of the contracts our API created failed, with peaks of 24 a second.
Data. No data was lost. Database work that was abandoned or dropped was rolled back.
What went wrong
Our relay servers ran out of CPU as the network grew
From 19:00, the servers that relay traffic between devices ran 77–90% busy, and work waited for a free core 30–48% of the time. The relay's cost per message had not changed; the network had grown. From Oct 23 to Oct 26, connected clients tripled, from 67,000 to 203,000, the messages the relay carries grew from 250,000 to 3.4 million a second, and the relay's CPU use grew from 28 cores to 183. The servers' network stacks strained too, retransmitting tens of thousands of packets a second.
CPU-starved servers held database connections they weren't using
Each piece of database work holds one of the pooler's connections from start to finish. The database did its part in 1 to 2 milliseconds, but servers waiting for CPU held each connection for about 14, so at any moment most connections sat idle, waiting on the server that held them. All 640 were busy, and requests waited about 54 milliseconds for one, up to 11,462 at a time. The pooler kept 128 reserve connections for this, but it opened them only after a request had waited 5 seconds, and it dropped requests that had waited 4, so the reserve never opened, and every dropped request reconnected and added to the load.
The load balancer in front of the pooler piled connections onto a few workers
Connections to the pooler pass through a load balancer that spreads them across the pooler's 32 processes. Its 32 workers shared one listening socket, and whichever worker woke first took every waiting connection, so 4 workers held 61% of its 14,500 connections while most held fewer than ten. The busiest used 71% of a core, and requests through it waited their turn. The simplest query took 0.07 milliseconds on the database itself, 7.4 through the pooler and 10.9 through the load balancer.
Two updates and duplicate checks made it worse
We rolled out two server updates during the slowdown. As each one's old processes finished draining, their clients reconnected at once, and hosted proxy failures spiked to 129 a second at 21:10 and 420 a second at 23:00. The second spike was more than reconnects: four relay groups drained together, and 75,600 failed requests piled up in our hosted proxy service, each retrying its cleanup for up to five minutes. It was the same flaw that had failed hosted proxy requests that afternoon, and that caused the next afternoon's outage. Checks that each connection's session is still valid made up about 40% of the pooler's work, about 17,000 a second, and the relay checked every connection twice a minute where once is enough. Contract creation and other updates to the same client records also waited on each other's locks.
Nothing alerted us for seven and a half hours
No alert watched the queue for database connections, the share of contracts that fail, or our servers' CPU pressure. A routine check of our metrics at 23:32 saw the hosted proxy failures, took them for the noise of the update, and didn't look at the queue. We found the slowdown at 02:25, when the next check compared the failures with the evening's.
What we changed
Each fix links to the public commits that made it. Changes to our servers' configuration are described without links.
- DoneThe load balancer in front of the pooler gives each worker its own listening socket, so new connections spread evenly, and a configuration reload now moves connections to the new workers gracefully. The average wait for a database connection fell from 54 to 39 milliseconds, and hosted proxy failures from about 20 a second to 3 to 7.
- DoneThe pooler opens its reserve connections after half a second of waiting, before it would drop a waiting request, and each of its processes has two more connections, within the database's limit.
- DoneEach service has a cap on the database connections it can hold, so no one service can fill the pooler.
- DoneThe relay checks each connection's session once a minute instead of twice, about 3,400 fewer database transactions a second.
- urnetwork/server · 4f963d6 ↗Refresh session hints on the corrective pass without rechecking every lease
- DoneThe relay does less work per message: idle connections between relay servers send a keepalive every 10 seconds instead of every second, where keepalives had been three quarters of their messages, and each relay process schedules its work on fewer cores, where scheduling had taken about 40% of its CPU.
- urnetwork/server · 606dd8c ↗Ping idle exchange connections every 10 s instead of every second
- DoneAbout 230 database writes a second that changed nothing are skipped; each hosted proxy contract had spent 0.13 to 0.21 seconds waiting on them. Creating a contract takes a lighter lock on client records, so it no longer waits behind unrelated updates to them.
- urnetwork/server · 41db3d5 ↗Skip network_client writes that would change nothing
- urnetwork/server · fb9ae96 ↗Lock network_client FOR KEY SHARE at the contract boundary and in key custody
Still open
- OpenMore capacity for the relay, or moving relay work to servers with room to spare. Until then, we roll out relay updates only when nothing is queued for the database, and slowly enough to spread out the reconnects.
- OpenCheck the remaining sessions in batches: one database read per server for all of its due checks, instead of one per connection.
- OpenAlerts that page us when contracts start failing, requests queue for the database, or our servers run short of CPU.