cd /news/developer-tools/a-404-that-wasn-t-what-running-our-o… · home › topics › developer-tools › article
[ARTICLE · art-178362] src=dev.to ↗ pub= topic=developer-tools verified=true sentiment=· neutral

A 404 that wasn't: what running our own package registry taught us

Kent Alstad, who runs a private package registry for npm and Rust crates, reported two incidents a day apart: a transient storage error was surfaced to Cargo as a 404, failing a release build, and a burst of roughly 25 concurrent builds exhausted the registry's database connection limit for about 110 seconds, returning HTTP 500. The fixes established a rule that null means definitely absent—real absences return 404 while transient failures return 503 with Retry-After—and extended retry windows, though Alstad noted a later branch reset silently dropped the fixes until they were re-applied.

recommendation

Map transient storage and database errors to 503 with Retry-After instead of 404, and widen retry windows beyond 8 seconds so concurrent build bursts survive connection-limit spikes.

more in playbook: Running AI in production
by read2 min views6 publishedNov 30, 2026

A short update from the series on evidence-based agentic development.

We run our own package registry for our private npm packages and Rust crates, behind a login. It's one of the pieces of the stack we chose to own rather than rent, and it's part of what my Build Stuff talk is about. This is what owning it has cost, in two incidents a day apart.

The 404 that wasn't. On 16 October the release build for one platform asked the registry for a crate and got a 404. The sibling build had downloaded the same crate 23 minutes earlier. Nothing had been deleted. The storage layer had hiccuped for a moment, and our adapters turned every storage error into "not found". Cargo treats a 404 as final, so one blip failed a whole release job.

The fix is one rule: null means definitely absent. A real "no such blob" is a 404. Anything else that looks transient is retried, and if it still fails the registry answers 503 with a Retry-After, which cargo and npm both retry. A package manager believes what your registry says, so the registry mustn't say "doesn't exist" when it means "I couldn't look".

The burst. The next day about 25 Linux and Windows builds started together, and for around 110 seconds the registry hit its database connection limit across some 40 index and download requests. We already retried, but the window was about 8 seconds, and every retry ran out. Cargo got HTTP 500.

Three changes, each with a reason attached:

The cache has a cost, and we wrote it down: a token revoked directly in the database can keep working for up to 30 seconds on an instance that already cached it.

One more thing, because it's the honest part. Five days later we reset our main branch to a release snapshot, and the reset silently dropped these fixes, along with two others, from the live line. We found out because we were checking, and re-applied all four. If a fix only exists in history, it doesn't exist.

The lesson I'd take for anything that sits underneath other people's builds is that the meaning of your errors is part of your API. 404 is final. 503 gets retried.

This is one of the write-ups behind my talk at Build Stuff in Vilnius this December, the 15th edition, under the theme The Age of Agency.

Control Your Fate at the Metal

Wednesday 2 December, 15:00, Zeta 2. 45 minutes.

If you're coming, say hello. If you're not yet, `2026SPEAKER_20` takes 20% off a ticket.

#BuildStuff15 #buildstuffconf #AgeOfAgency @buildstuffconf [https://buildstuff.events](https://buildstuff.events)

I'm Kent Alstad. I build KandiForge, a toolchain for running software projects with AI agents under an evidence-based process. If you run your own registry, I'd like to know what it taught you.

── more in #developer-tools 4 stories · sorted by recency
── more on @kent alstad 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/a-404-that-wasn-t-wh…] indexed:0 read:2min 2026-11-30 · —