Next.js: Long-Lived Servers and the Cost of Free Cache Keys
Today's changes center on resource leaks in long-running servers — from sandbox timeouts to unbounded cache accounting — plus a cluster of fixes to dev validation's new worker thread architecture. Both threads trace back to the same lesson: things that look free in memory usually aren't.
Duration: PT2M46S
Episode overview
This episode is a short developer briefing from Next.js.
It explains recent repository work in plain language.
- Show: Next.js
- Published: 2026-07-26T13:06:59Z
- Audio duration: PT2M46S
Transcript excerpt
This excerpt keeps the crawler page concise. Listen to the episode or use the RSS feed for the full update.
Good evening. It's July 26th, and today's commits circle around one theme: what happens to a Next.js server that stays up for a long time.
Start with PR 96161 from Pete Hunt. Fire-and-forget timeouts in the Edge sandbox — the kind middleware creates constantly — were tracked forever, even after they completed. On a self-hosted server that never restarts, that's monotonic heap growth toward an eventual out-of-memory crash. The fix releases each…
Dan Abramov picked up the same idea for caches. PR 96229 fixes the filesystem route cache's memory budget, which counted the size of cached values but treated the URL key itself as free — meaning bot crawls or long dynamic slugs could quietly balloon memory. PR 96231 extends that same key-accounting fix to every…
The second theme is dev validation's worker thread, introduced recently to keep the event loop responsive. Hendrik Liebau landed a run of fixes this week: PR 96218 teaches the worker to read source maps directly off disk instead of relying on Node's per-isolate cache, PR 96215 adds a fallback lookup for chunk paths…
Smaller but notable: Gaearon's PR 96235 fixes "use cache" invalidation timing in dev, and PR 95943 adds a benchmarking…
Wh…
Nearby episodes from Next.js
- Plugging Memory Leaks and Taming V8 Deopts
- TypeScript 7 Fallout and the Turbopack Tree-Shaking Push
- Caching Gets Honest About What's Stale
- Security Patch Wave and Windows Path Fixes
- Taming Instant Validation, and Turbopack's Tree-Shaking Push
- Chasing Down Dev Server Memory and Source Map Costs
- Weekly Recap - Navigation Stability & Turbopack Runtime Slimming
- Trimming Waste in Rendering and Requests