Node.js streaming server (server.js) memory leak, ~1 GB per 20 s, ends in kernel OOM kill
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- node.js
- Domain
- backend
Research direction
Start with the bundled /usr/share/stremio/server.js and the streaming-proxy path around line 80165. Reproduce streaming followed by idle time while monitoring the node-MainThread RSS and journalctl output for repeated “Error: stream ended” messages. Done means the process no longer grows without bound or reaches an OOM kill under the reported scenario.
Written by the indexing model from the issue text.
Description
Installation type
Source
Version
v1.2.0
Platform
Cachyos
Desktop Environment
KDE
Windowing System
Wayland
GPU
AMD
Describe the bug
Bug: Node.js streaming server (server.js) memory leak, ~1 GB per 20 s, ends in kernel OOM kill
Version: stremio-linux-shell 1.2.0-1 (Arch package)
OS: CachyOS (Arch-based), kernel 7.1.8-1-cachyos, KDE Plasma 6 / Wayland
Hardware: Ryzen 5000, 16 GB RAM, Radeon RX 6700 XT (mesa/vulkan-radeon 26.1.6)
Related: node v26.7.0, mpv 0.41.0. Swap: zram 15.5 GB zstd, swappiness 150.
Description
While Stremio runs, the bundled Node.js server (/usr/share/stremio/server.js,
spawned as node-MainThread) grows without bound. Measured live:
- RSS 3.1 GB → 4.2 GB in 20 seconds (~1 GB / 20 s) while idling after streaming.
- Whole app unit peaked at 8.5 GB RAM + 10.2 GB swap in ~8 min, exhausting 16 GB
RAM + 16 GB swap, after which the kernel OOM killer killednode-MainThread:
Out of memory: Killed process 27601 (node-MainThread)
total-vm:21526164kB anon-rss:1491772kB file-rss:11520kB ... oom_score_adj:200
systemd[1400]: app-com.stremio.Stremio@...service: Failed with result 'oom-kill'.
systemd[1400]: ... Consumed 3min 18s CPU ... 8.5G memory peak, 10.2G memory swap peak.
Console output during leak
Error: stream ended
at Socket.onFinished (/usr/share/stremio/server.js:80165:145)
...
2026-08-21T12:02:29.2Z ERROR stremio_linux_shell::app::webview: Failed to send message: TypeError: undefined is not a function
The leak appears tied to the streaming proxy — repeated Error: stream ended at
server.js:80165 while memory climbs.
The key evidence: ~1 GB/20 s growth in server.js's node process and the OOM log showing 8.5G peak + 10.2G swap. You can attach the full journalctl OOM block too.
Logs
No response
- Dominant language
- Rust
- Stars
- 145
- Forks
- 45
- Avg merge
- 7h 8m
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Stremio/stremio-linux-shell
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
Stremio/stremio-linux-shell#103 · 1 comment · 3 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
Stremio/stremio-linux-shell#137 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
Stremio/stremio-linux-shell#133 · 5 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Stremio/stremio-linux-shell#132 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
Stremio/stremio-linux-shell#131 · 2 comments ·
All issues in Stremio/stremio-linux-shell
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100