Heap limit Allocation reached on first time running "npx start" after setting up the project.

I think the issue is due to backend scripts because same error occurs on running
npx nx start twenty-server
npx nx start twenty-server
command but I don't know how I can resolve this.
<--- Last few GCs --->
[0]
[0] [42828:0x3aff7000] 40414 ms: Scavenge (interleaved) 2043.4 (2085.9) -> 2042.0 (2086.2) MB, pooled: 0 MB, 11.70 / 0.01 ms (average mu = 0.261, current mu = 0.256) allocation failure;
[0] [42828:0x3aff7000] 41101 ms: Mark-Compact 2043.7 (2086.2) -> 2037.8 (2085.7) MB, pooled: 0 MB, 678.57 / 0.01 ms (average mu = 0.164, current mu = 0.082) allocation failure; scavenge might not succeed
[0]
[0]
[0] <--- JS stacktrace --->
[0]
[0] FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
[0] ----- Native stack trace -----
[0]
[0] 1: 0xe1bdfe node::OOMErrorHandler(char const*, v8::OOMDetails const&) [node]
[0] 2: 0x123e800 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
[0] 3: 0x123ead7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
[0] 4: 0x146c615 [node]
[0] 5: 0x146c643 [node]
[0] 6: 0x14856fa [node]
[0] 7: 0x14888c8 [node]
[0] 8: 0x1cc3ef1 [node]
[0] Aborted (core dumped)
<--- Last few GCs --->
[0]
[0] [42828:0x3aff7000] 40414 ms: Scavenge (interleaved) 2043.4 (2085.9) -> 2042.0 (2086.2) MB, pooled: 0 MB, 11.70 / 0.01 ms (average mu = 0.261, current mu = 0.256) allocation failure;
[0] [42828:0x3aff7000] 41101 ms: Mark-Compact 2043.7 (2086.2) -> 2037.8 (2085.7) MB, pooled: 0 MB, 678.57 / 0.01 ms (average mu = 0.164, current mu = 0.082) allocation failure; scavenge might not succeed
[0]
[0]
[0] <--- JS stacktrace --->
[0]
[0] FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
[0] ----- Native stack trace -----
[0]
[0] 1: 0xe1bdfe node::OOMErrorHandler(char const*, v8::OOMDetails const&) [node]
[0] 2: 0x123e800 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
[0] 3: 0x123ead7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
[0] 4: 0x146c615 [node]
[0] 5: 0x146c643 [node]
[0] 6: 0x14856fa [node]
[0] 7: 0x14888c8 [node]
[0] 8: 0x1cc3ef1 [node]
[0] Aborted (core dumped)
6 Replies
DemonMango
DemonMangoOP4mo ago
Hey @Prastoin , how much memory should I allow? 6gb? And also, Could you please tell me how much memory is minimum required to run the setup? So that I can know whether it is possible for me to run it or not.
Prastoin
Prastoin4mo ago
Hey please refer to system requirements here https://twenty.com/developers/section/self-hosting/docker-compose#system-requirements Depends on available RAM on your machine, but you could give a try to 8GB NODE_OPTIONS=--max-old-space-size=8192
DemonMango
DemonMangoOP4mo ago
Here it says min 2GB is required but it's crashing on wsl in 6 gb ram
Prastoin
Prastoin4mo ago
Mhm my bad forwarded you the self hosting system requirements Dev env is way more consuming than the live built app
DemonMango
DemonMangoOP4mo ago
oh so, it isn't written anywhere? I have 16 gb ram and wsl is using half of it currently.

Did you find this page helpful?