Repository navigation
Description
What happened?
yarn start runs ng serve with no --max-old-space-size flag, so the dev server uses Node's default V8 heap. On a machine where that default is ~2 GB, the very first incremental rebuild after any source edit pushes the webpack build past the heap limit and Node aborts:
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
ng serve exited with code SIGABRT
Because the start script uses concurrently --kill-others, the ng-serve crash immediately kills the sibling y-websocket process too, so the whole yarn start dies and :4200 stops responding ("cannot resolve host"). It does not recover on its own — the only way back is to restart the dev server (or the whole local-dev stack).
Expected: editing a frontend file should trigger a normal hot-reload; the dev server should stay up.
Note the inconsistency: the build script already runs Angular under node --max-old-space-size=8192, but start (ng serve) does not. So production builds are protected and the dev server is not.
Why it doesn't reproduce for everyone: Node auto-sizes the default heap from physical RAM. On an 8 GB machine the default is ~2.24 GB (crashes); on 16 GB+ machines the default is large enough that the rebuild fits, so those contributors never see it. This is why it has gone unnoticed — it only bites lower-RAM machines.
How to reproduce?
- Bring up the frontend dev server (
bin/local-dev.sh up frontend, i.e.cd frontend && yarn start). - On a machine with ~8 GB RAM (Node default heap ~2.2 GB — verify with:
node -e "console.log(require('v8').getHeapStatistics().heap_size_limit/1024/1024)"). - Open http://localhost:4200 and confirm it loads.
- Make any trivial edit to a template, e.g. remove/add a line in
frontend/src/app/hub/component/about/about.component.html, and save. - Observe: the incremental rebuild OOMs,
ng serveexits with SIGABRT,
--kill-othersterminates y-websocket, and :4200 becomes unreachable.
Proposed fix: give ng serve the same heap ceiling build already uses, e.g.
"start": "concurrently --kill-others \"npx y-websocket\" \"node --max-old-space-size=8192 ./node_modules/@angular/cli/bin/ng serve\"",
Verified: with the flag, the identical edit recompiles ("Compiled successfully") and :4200 stays up; zero OOM across repeated rebuilds.
Version/Branch
1.3.0-incubating-SNAPSHOT (main)
Commit Hash (Optional)
What browsers are you seeing the problem on?
No response
Relevant log output
[1] <--- Last few GCs --->
[1] [83836:0xa0940c000] 873898 ms: Scavenge (interleaved) 2034.8 (2049.9) -> 2034.7 (2054.1) MB ... allocation failure;
[1] [83836:0xa0940c000] 875337 ms: Mark-Compact 2040.3 (2057.0) -> 2039.8 (2067.5) MB ... allocation failure; scavenge might not succeed
[1] FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
[1] 1: 0x10474f848 node::OOMErrorHandler(char const*, v8::OOMDetails const&)
[1] 2: 0x10494ea14 v8::internal::V8::FatalProcessOutOfMemory(...)
[1] ng serve exited with code SIGABRT
--> Sending SIGTERM to other processes..
[0] npx y-websocket exited with code SIGTERM
Activity
KYinXu commentedon Jul 24, 2026
/take
gupta-sahil01 commentedon Jul 25, 2026
@KYinXu I plan to resolve this once I receive approval from the devs that this is a valid bug.
KYinXu commentedon Jul 25, 2026
Ok, I'll leave it to you then.
KYinXu commentedon Jul 25, 2026
/untake
chenlica commentedon Jul 26, 2026
@gupta-sahil01 If you can produce the issue, feel free to "take" it and solve it.
gupta-sahil01 commentedon Jul 26, 2026
/take
fix(frontend): raise ng serve heap limit to avoid OOM on low-RAM mach…