mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #5585] [Issue]: JavaScript heap out-of-memory crash on Termux #3094
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#3094
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @SpicyMarinara on GitHub (Aug 27, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5585
Originally assigned to: @Romuromylus on GitHub.
Summary
Marinara Engine 2.4.4 crashed multiple times after updating while running in Termux. The Termux log reports a JavaScript heap out-of-memory error and process exit code 134.
Expected behavior
Marinara Engine should continue running without exhausting the JavaScript heap or crashing.
Actual behavior
The Marinara Engine server exhausts the JavaScript heap, aborts, and exits with status code 134.
Steps to reproduce
Environment
Logs, screenshots, or video
Termux log: "FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory" followed by "./start-termux.sh: line 679: 6585 Aborted node dist/index.js" and "Marinara Engine server exited with status 134." Before the crash, diagnostics showed heap 1097.6 / 1632 MiB and RSS 1263.1 MiB. Active connection: Openrouter; model: xiaomi/mimo-v2.5.
Additional context
The user reported two crashes after updating, then reported another crash shortly afterward. A post-crash diagnostic showed server OS, server memory, build, and commit as unavailable. The first diagnostic identified build 2.4.4+1a299369ac70 and commit
1a299369ac.Discord thread: Memory leak? Program crashing!
Discord thread link: https://discord.com/channels/1417099416812392641/1542661281993982002
Requested by: gunterlie (gunterlie, Discord ID 282074442962829312)
Discord thread transcript (7 messages)
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@Romuromylus commented on GitHub (Aug 29, 2026):
Fixed by PR #5587, squash-merged into staging as
04bf2d110. The Termux launcher's default Node.js heap now budgets roughly twice the on-disk structured profile plus 512 MiB of headroom, bounded by one quarter of known device RAM (never below the 1 GiB baseline, and 1536 MiB when device memory cannot be read), so a large profile regains the headroom it had under the pre-2.4.4 2 GiB default. On the reported setup (~1.1 GiB profile, 8 GiB device) the launcher resolves 2048 MiB again — the log line to look for on next start is "Node.js heap limit set to 2048 MiB for this profile and device". Staging also carries the #5592 lazy-storage/LRU-eviction work, which reduces the resident working set on top of this. If the reporter can update to staging and confirm a long session survives, that closes the loop.