Repository navigation
JCU: SSR idle timer only in the browser, drain xhr2 redirect bodies - #1639
Merged
Merged
Conversation
Port of TUL PR 1597 (commit 6a74ddb), written for the 9.x code. On the server the idleness timer kept every finished render in memory until it fired, and redirect responses that xhr2 follows kept their socket busy. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
References
Port of TUL PR 1597 (commit 6a74ddb). TUL outage on 2026-10-12: SSR workers died at the heap limit during a bot wave on
/handleURLs. The mechanism is the same on every branch, TUL was only the first one to hit the limit.Description
Two things kept every finished SSR render in memory: the 15-minute idleness timer of
AuthEffects, and the socket of REST redirects that xhr2 follows without reading the body (thepid/find302 behind every/handle/...page). The timer now runs only in the browser and the redirect bodies are drained.Instructions for Reviewers
AuthEffects.trackIdleness$:filter(() => isPlatformBrowser(this.platformId))comes first,PLATFORM_IDis injected in the constructorServerXhrService: wraps xhr2's_onHttpResponseand callsresponse.resume()on 301, 302, 303, 307 and 308timeUntilIdle, the server starts no timer.ServerXhrServicehas no spec, Karma uses xhr2's browser build/handle/...requests instead of growing until the restartauth.effects.spec.tspasses locally (27 tests), eslint cleanChecklist
🤖 Generated with Claude Code