Replies: 2 comments
dsh web OOM investigation1. Scenario: Linux reproduction matching #3275
Node's default 2. Heap snapshot evidence (live instance; 63,846,145 nodes / 3161MB live heap)
3. The oversized session profile (session dir = 149MB compressed; one 8-day session alone = 115MB)Decompressed and stream-analyzed the largest single session (protocol-level data only, no content):
4. Memory expansion mapping
5. Workaround verified & suggested next stepsWorkaround verified: Suggestions:
Happy to share the full heap-snapshot aggregation (by type/constructor, 63.8M nodes) or the event-level stats script for validating any proposed fix. |
|
Adding measurements from a Windows machine that reproduce this without any client, plus the retention point. Environment: Windows 10 Pro 19045, Node v24.15.0 (default heap ~4.29 GB), 64 GB RAM. 1. Not client-triggered. 2. The retention point. With
3. It is aggregate retention, not one bad or one large session. Keeping only part of the store:
4. Ruled out (so nobody chases these):
5. No corruption signal. dsh's corruption handling leaves artifacts (the projection cache moves 6. Relationship to #5995. #5995 attributes unbounded growth to Candidate fixes on the read side: don't retain the decoded log in the handle state ( |
Uh oh!
There was an error while loading. Please reload this page.
Web server OOMs (V8 heap) within ~60 s of any client connecting when a workspace contains a large session
Environment
@deepseek-ai/dsh0.1.0-rc.7 via global npm install (also reproduced on 0.1.0-rc.6)dsh web(also with--trusted-host <non-loopback-authority>; the leak is identical with and without the flag)Symptom
When any client connects — one real browser tab of the Web UI, or a single bare WebSocket to
/api/events.mux— the server RSS grows ~150–170 MB/s until it hits the V8 heap cap and dies withFATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory(exit code 134). Nothing is written to the server log before the crash; the client receives zero frames onevents.mux.Root cause (bisected)
The leak is triggered by a single large session (log ≈ 172k events, ≈ 3 MB zstd-compressed
session.jsonl.zstd):Reproduces with real browser tabs and bare WebSockets, over localhost and behind a reverse proxy. The same server previously ran a full day with a connected tab while the session was smaller; the leak appeared once the session crossed a size threshold.
Reproducer
Start
dsh webon a profile whose workspace contains one session with a large log (~170k+ events).Wait for the UI to answer on the configured port.
Connect a single WebSocket:
Watch the server RSS: grows ~150 MB/s until the OOM crash.
Impact
Any connected client kills the server within ~1 minute once a workspace contains a large session, making the Web UI unusable for long-lived sessions; two connected clients die faster.
Notes
$DSH_HOME/sessions/...as zstd-compressed JSONL.DSH_TELEMETRY_MODEunset) — unrelated.All reactions