You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DevServer: cap concurrent app Hot Reload workspaces; disable HR on oldest beyond N without closing the socket #24205
Each /rc app connection gets its own DI scope → its own RemoteControlServer + MSBuild workspace + EnC DebuggingSession ≈ +330–900 MB each. Measured: host 108 MB → 439 MB after 1 app → 1348 MB after 2 apps, with nothing disposed. There is no cap.
If an agent restarts an app in a loop, or a crash/half-open socket leaves a previous connection alive, workspaces stack and memory explodes.
Proposal: cap the number of active app Hot Reload workspaces (e.g. ~5). Beyond the cap, disable HR for the oldest app(s) — i.e. dispose their workspace / DebuggingSession to reclaim the ~500 MB — without closing the /rc socket (closing it would trigger the client's auto-retry → reconnect storm). Re-arm the workspace if that app becomes active again. Workspace lifetime is independent from the socket, so this is feasible.
Related: #24151 companion issues on server-side keepalive (reaping half-open sockets) and per-solution/baseline/target workspace sharing.
Verified fixed on Uno.WinUI.DevServer 6.8.0-dev.159 (Uno.Sdk 6.8.0-dev.39), Windows, desktop head.
Launched up to 10 concurrent app connections against a standalone DevServer host:
apps
host WS
event
1
565 MB
5
2043 MB
~370 MB/app
6
2402 MB
cap fired
8
2784 MB
cap fired
10
3462 MB
cap fired
HotReloadWorkspaceRegistry caps at 5 (DefaultMaxConcurrentWorkspaces), evicts the oldest, and logs:
Hot reload disabled for this connection: …reached its concurrent hot-reload workspace limit (5). The connection is
kept alive; restart the app to get a fresh hot-reload session.
All evicted apps stayed connected and running — the /rc socket is kept alive as proposed, no reconnect storm.
Reclaim confirmed by gcroot on a process dump at 8 apps / 4 evictions: 5 rooted DebuggingSession (= the cap), 3
unrooted — exactly the apps evicted while connected. The workspace and EnC session are genuinely unrooted, nothing
leaked.
Activity
fix(devserver): cap concurrent hot-reload workspaces, disable oldest …
khaskoul commentedon Sep 14, 2026
Verified fixed on
Uno.WinUI.DevServer6.8.0-dev.159 (Uno.Sdk 6.8.0-dev.39), Windows, desktop head.Launched up to 10 concurrent app connections against a standalone DevServer host:
HotReloadWorkspaceRegistrycaps at 5 (DefaultMaxConcurrentWorkspaces), evicts the oldest, and logs:All evicted apps stayed connected and running — the
/rcsocket is kept alive as proposed, no reconnect storm.Reclaim confirmed by
gcrooton a process dump at 8 apps / 4 evictions: 5 rootedDebuggingSession(= the cap), 3unrooted — exactly the apps evicted while connected. The workspace and EnC session are genuinely unrooted, nothing
leaked.
Jen-Uno commentedon Sep 30, 2026
QA: closing out without a manual pass. The fix in #24240 ships with automated tests (
Given_HotReloadWorkspaceRegistry.cs) that exercise the change.If you still see this behaviour on a build that includes that PR, please reopen or comment here.