Repository navigation
Conversation
The next-server child is spawned with --max-old-space-size=6144 on the command line. Node reads NODE_OPTIONS first and lets command-line flags win, so that value cannot be lowered from outside: on a host with a cgroup limit (systemd MemoryMax, docker --memory, k8s) the child runs believing it has 6 GB of heap. GC never feels the limit, RSS climbs to the ceiling, and the kernel OOM-kills next-server — taking in-flight streaming responses with it. The supervisor restarts and it happens again. The default is unchanged for the desktop case it was raised for. It now steps aside once the operator has said what they want: - NINEROUTER_MAX_OLD_SPACE_SIZE=384 caps the heap at 384 MB; 0 passes no flag at all and lets node size the heap from the memory it can see. - A --max-old-space-size already present in NODE_OPTIONS is respected rather than overridden, so the standard mechanism finally works. A junk value keeps the default and warns, rather than quietly leaving the heap uncapped — losing a safety cap to a typo is the wrong failure direction. Deriving the default from available memory is deliberately not done here: os.totalmem() reports the host's RAM, not the cgroup limit, so it would not help the containerised case that motivates this and would change behaviour everywhere else. Reported in decolua#3365, and previously in decolua#1982.
Switching to tray mode called enableAutoStart() unconditionally, so neither way of turning autostart off survived a restart: the tray's "Disable" was undone by the next hide, and deleting the startup entry by hand was undone too. The report is filed against Windows, but the call is platform-agnostic and macOS and Linux behave the same. Split the automatic path from the deliberate one. ensureAutoStart() writes an entry only until the choice has been made once -- by it, or by an explicit enable or disable -- and records that in the CLI's data directory. enableAutoStart() and disableAutoStart() stay deliberate and always write. A first install still gets autostart on its first hide, as before. Fixes decolua#3628
This was referenced Sep 8, 2026
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.
Two CLI/desktop fixes that were sitting in separate PRs (#3368, #3651), rebased onto current
master. Independent commits.fix(cli)(#3365) — a hard-coded heap cap overrode the operator's own--max-old-space-size. The launcher appended its default after the user's flags, and Node takes the last occurrence, so raising the cap for a large workload silently did nothing.fix(cli)(#3628) — switching to tray mode re-enabled autostart every time, even for a user who had explicitly turned it off. The tray path called the enable routine unconditionally instead of honouring the stored choice.Verification
Run with vitest 3 and the repo config — both parts matter:
Without
--configthe@/alias does not resolve (Failed to load url @/lib/dataDir.js). And vitest 2.x cannot run anything that reachesopen-sse/translator/index.js: it throwsTypeError: register is not a functionat the top-levelregister(...)calls, becauseindex.jsdeliberately relies on function-declaration hoisting to survive the import cycle while Vite 5's SSR transform turns the named import into a call-time property access. I confirmed that failure on cleanmasterand onmasteras of 15 Aug, so it is not caused by these changes.Every fix was checked by reverting it and confirming which test dies. No claim here rests on a test that passes for another reason.