# A retry storm made most new hosted proxy connections fail for three and a half hours

> While we rolled out the fixes for the previous night's slowdown, restarting our relay servers sent a burst of contract requests at our hosted proxy service, and a flaw kept every failed request running its cleanup for up to five minutes. From 14:43 to 18:08 up to 182,028 failed requests were stuck at once, and most new connections through the service failed, while the apps worked normally. Cutting the cleanup to 5 seconds ended the storm; the last relay restart set off a smaller second episode at 19:50, which ended at 22:40 when the service stopped making dozens of refused tries for each contract.

Started Oct 26 14:43 UTC; ended Oct 26 22:40 UTC, 7 h 57 min. Worst level: Partial outage.
https://ur.io/outages/2026-10-26

At 14:18 on Oct 26 we began restarting our relay servers, one group at a time, to finish rolling out the fixes for the previous night's slowdown. A restart cancels no contracts, the agreements a device needs before it can send traffic through a provider, but it makes every process of our hosted proxy service ask for many new ones at once. From 14:43 some of those requests failed, and a flaw kept each failed request inside the service for up to five minutes, retrying the cleanup of what it had set aside. About 600 failures a second piled up to 182,028 stuck requests. They took the connections the service uses to reach our cache, so new requests failed too, and for three and a half hours most new connections through the service failed, while the apps worked normally. Restarts cleared it for minutes only. Cutting the cleanup to 5 seconds ended the storm by 18:08, and a new limit on requests per process, rolled out next, refused some requests until 19:25. At 19:50 the last relay restart set off a smaller second episode: each new contract took dozens of refused tries, and requests timed out again until a fix that skips those tries reached every process, by 22:40.

## Phases

| From (UTC) | To (UTC) | Level | What people saw |
|---|---|---|---|
| Oct 26 14:43 | Oct 26 18:08 | Partial outage | Most new connections through our hosted proxy service failed: about 600 contract requests a second failed, against 20 to 28 that succeeded, while the apps worked normally. |
| Oct 26 18:08 | Oct 26 18:50 | Healthy | Back to normal: no failures, and 180 to 217 contracts a second by 18:15. |
| Oct 26 18:50 | Oct 26 19:25 | Degraded | While a new limit rolled out, four of the hosted proxy service's ten process groups refused some contract requests and failed about 12 a second each. |
| Oct 26 19:25 | Oct 26 19:50 | Healthy | Back to normal: 13 stuck requests and almost no failures at 19:31. |
| Oct 26 19:50 | Oct 26 22:40 | Degraded | After the last relay restart, 47 to 99 contract requests a second failed and hundreds more timed out and were retried, while the service still completed 64 to 128 a second. |

## Key moments

- Oct 26 14:18: We start restarting our relay servers one group at a time, the last step in rolling out the fixes for the previous night's slowdown.
- Oct 26 14:43: After the second group restarts, failed contract requests start to pile up in our hosted proxy service, each one retrying its cleanup for up to five minutes.
- Oct 26 15:15: 182,028 failed requests are stuck in cleanup, and the service's servers are out of CPU. It completes 20 to 27 contracts a second.
- Oct 26 15:42: The rollout's own check stops it, an hour after the storm began; no alert had fired. By 15:56 we have traced the storm to the cleanup, from our metrics and the code.
- Oct 26 16:00: We restart the hosted proxy service one group at a time, until 16:29. Each restarted process starts clean, but by 16:33 about 60,000 requests are stuck again.
- Oct 26 17:27: The storm peaks again, at about 173,000 stuck requests. A minute later we decide to cut the cleanup to 5 seconds.
- Oct 26 18:00: The first group takes the 5-second cleanup. By 18:08 the storm has collapsed in every group, even the ones not yet updated.
- Oct 26 18:34: A limit of 256 contract requests at a time per process starts rolling out. From about 18:50, four restarted groups hit it while two cache nodes run hot, and refuse some requests until about 19:25.
- Oct 26 19:50: The last relay group restarts, and the rollout's check stops at 2,179 stuck requests, as designed. A smaller second episode begins: stuck requests swing between 1,200 and 4,000, and requests time out on dozens of refused tries per contract.
- Oct 26 21:50: A fix that skips the tries a quick read-only check proves would be refused goes to one group, whose failures drop to zero. It reaches the rest from 22:07, and the episode is over by 22:40.

## Who was affected

- **Hosted proxy customers.** From 14:43 to 18:08, most new connections through our hosted proxy service failed: it completed about 20 to 27 contracts a second, while 450 to 1,350 a second failed, each taking about five minutes to return. By 18:15 it completed 180 to 217 a second, with no failures. From about 18:50 to 19:25, a new limit refused some requests on four of its ten process groups. From 19:50 to 22:40, 47 to 99 contract requests a second failed and up to 865 a second timed out and were retried, while it completed 64 to 128 a second, close to its usual evening rate. We did not measure traffic over connections that were already open.
- **People using the apps and our API.** Not affected: at 16:05 our API completed about 296 contracts a second, with 0.24 failures a second. The relay, the database and its connection pooler stayed healthy.

## What went wrong

- **A failed request waited out its own cleanup, for up to five minutes.** When a contract request fails, our hosted proxy service releases what it had set aside for it. That cleanup ran inside the request and retried for up to five minutes, whether or not anyone was still waiting, and every failure left cleanup to do, even one that never reached our cache. About 600 failures a second, each held about five minutes, kept up to 182,028 cleanups running at once, about 9,000 in each of the service's 20 processes. The five-minute limit had been in the code since Oct 3; the update didn't add it.
- **Timeouts turned into reconnects, and the storm fed itself.** The cleanups and new requests shared a small pool of connections to our cache, and every request that timed out closed its connection, so the next one had to connect again. Each of the service's servers opened about 4,000 new connections a second, and one cache node spent most of its time accepting them. New requests timed out waiting for a connection, and each timeout turned another request into a failure with a cleanup of its own. The service's servers ran 21 to 22.7 of their 24 cores.
- **Restarting our relay servers set it off.** Restarting a group of relay servers cancels no contracts, but it makes every hosted proxy process ask for many new ones at once, and nothing limited how many a process ran at once. Clients retried on a fixed schedule with no randomness, and a connection that got no contract for 30 seconds was torn down and replaced by a new one that asked again. The same flaw had already run unnoticed the afternoon before, from 14:45 to 18:00, and again in the previous night's 23:00 spike, when four relay groups drained together.
- **Restarts didn't hold, and the fix was slow to build.** Restarting the hosted proxy service from 16:00 to 16:29 emptied each process, but each came back with the same five-minute cleanup and the same small pool, and within minutes about 60,000 requests were stuck again. Nothing could turn this path off without a new build. After we decided to cut the cleanup to 5 seconds, our image builder crashed under three builds at once, and the fix reached the first group 32 minutes later.
- **Our checks watched the previous night's problem, and nothing paged us.** After the previous night's slowdown, the relay rollout was gated on the database queue and on failed requests. This burst landed on the hosted proxy's CPU and its connections to the cache, which no check measured, and a failed request was counted only when it returned, up to five minutes late. The check passed twice while the storm built, and stopped the rollout only at 15:42. No alert covered stuck requests, cleanup errors, cache connection timeouts or the service's CPU.
- **The last restart met dozens of refused tries per contract.** At 19:50 the last relay group's restart sent another burst. The 5-second cleanup and the new limit kept it bounded, but before it creates a contract the service runs a lookup that can take several tries, and that evening nearly every try was refused: about 88 for each one accepted, each a full round trip to our cache through the same small pool of connections. Requests ran into their one-second deadline and devices retried, so the episode fed itself for almost three hours, until the service learned to skip the tries a quick read-only check proves would be refused.

## What we changed

- Done (2026-10-26): A failed request's cleanup now gives up after 5 seconds instead of five minutes. Within minutes of the first group taking it, the storm collapsed in every group.
  - [urnetwork/server@6ba9d88](https://github.com/urnetwork/server/commit/6ba9d88af772): Bound contract compensation cleanup to 5 seconds
  - [urnetwork/server@186764e](https://github.com/urnetwork/server/commit/186764e4f0f4): Step the lost release acknowledgement test inside the 5 second cleanup budget
- Done (2026-10-26): Each hosted proxy process runs at most 256 contract requests at once and refuses the rest straight away, before any other work. It runs on all ten groups.
  - [urnetwork/server@88117cc](https://github.com/urnetwork/server/commit/88117cc0336c): Bound the contract creations a proxy process runs at once
- Done (2026-10-26): The lookup before each contract skips the tries that a quick, read-only check proves would be refused, instead of making each one in full. The first group to get it dropped to zero failures and timeouts, and once every group had it, the service ran on 5 of its 24 cores, its lowest of the day. Our API, which makes the same tries, got it at 23:06.
  - [urnetwork/server@b5a3cb5](https://github.com/urnetwork/server/commit/b5a3cb526ef4): Skip Redis grant reservations that a read-only probe proves would refuse
  - [urnetwork/server@d501a8b](https://github.com/urnetwork/server/commit/d501a8b8dd3c): Double each grant probe read so probing costs at most one read beyond the refusals it skips
- In progress (2026-10-26): The cleanup moves out of the request: a refused request hands it to a small background worker that retries with backoff, and returns at once. It is merged and ships with the next release.
  - [urnetwork/server@948ca66](https://github.com/urnetwork/server/commit/948ca66b2756): Release a refused contract's tokens through a bounded deferred owner

## Still open

- Stagger relay restarts, and gate them on the hosted proxy's CPU and on the requests it has in flight, not only on failures.
- Alerts that page us when requests pile up in our hosted proxy service, its cleanup fails, its connections to the cache time out, or its servers run short of CPU.
- Keep connections to the cache open through a timeout instead of reconnecting, allow each process more of them, and make clients retry at random intervals instead of tearing connections down.
- Give the hosted proxy's servers room for bursts.

Published 2026-10-26; last updated 2026-10-29.
