next.js
004970f6 - fix: release retained fetch dedupe clones at cache-scope completion

Commit
28 days ago
fix: release retained fetch dedupe clones at cache-scope completion Cached server-side fetch()es under Cache Components retain the second cloneResponse() tee branch in the React fetch-dedupe cache. The retained clone holds the whole response off-heap and is freed only on GC, which lags for off-heap memory under sustained load, so the clones accumulate until OOM (#92287). Cancel the retained clone on React.cacheSignal(), which React aborts when the cache scope settles, releasing the bytes deterministically instead of waiting for GC. Covers fetches inside "use cache" and render-level fetches. Fixes #92287
Author
Committer
Parents
Loading