Node.js Heap Out of Memory Error During Script ExecutionThis issue title captures the core problem of a Node.js process failing due to memory allocation constraints
Bug Description
● Write(scripts/installation/unified-5.exs)…
⎿ Waiting…
· Updating… (242s · 302 tokens · esc to interrupt)
╭──────────────────────────────────────────────────────────────────────────────╮
│ > │
╰──────────────────────────────────────────────────────────────────────────────╯
? for shortcuts
<--- Last few GCs --->
[30742:0xac78000] 11878482 ms: Mark-Compact 3732.4 (4142.2) -> 3716.6 (4142.4) MB, pooled: 8 MB, 141.59 / 0.04 ms (average mu = 0.930, current mu = 0.681) allocation failure; scavenge might not succeed
[30742:0xac78000] 11878639 ms: Mark-Compact 3733.1 (4143.9) -> 3718.2 (4144.2) MB, pooled: 8 MB, 125.50 / 0.04 ms (average mu = 0.870, current mu = 0.203) allocation failure; GC in old space requested
<--- JS stacktrace --->
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----
1: 0xe36196 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [node]
2: 0x123f4a0 v8::Utils::ReportOOMFailure(v8::internal::Isolate, char const, v8::OOMDetails const&) [node]
3: 0x123f777 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate, char const, v8::OOMDetails const&) [node]
4: 0x146d1a5 [node]
5: 0x1486a19 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
6: 0x145b0e8 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
7: 0x145c015 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
8: 0x143440e v8::internal::Factory::AllocateRaw(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [node]
9: 0x1423504 v8::internal::FactoryBase<v8::internal::Factory>::AllocateRawWithImmortalMap(int, v8::internal::AllocationType, v8::internal::Tagged<v8::internal::Map>, v8::internal::AllocationAlignment) [node]
10: 0x14246f9 v8::internal::FactoryBase<v8::internal::Factory>::AllocateRawTwoByteInternalizedString(int, unsigned int) [node]
11: 0x1436e9d v8::internal::Factory::NewInternalizedStringImpl(v8::internal::Handle<v8::internal::String>, int, unsigned int) [node]
12: 0x1771413 v8::internal::Handle<v8::internal::String> v8::internal::StringTable::LookupKey<v8::internal::InternalizedStringKey, v8::internal::Isolate>(v8::internal::Isolate, v8::internal::InternalizedStringKey) [node]
13: 0x17715b7 v8::internal::StringTable::LookupString(v8::internal::Isolate*, v8::internal::Handle<v8::internal::String>) [node]
14: 0x18a0b16 v8::internal::Runtime_GetProperty(int, unsigned long, v8::internal::Isolate) [node]
15: 0x7c240b66c476
Aborted (core dumped)
08:00:54 (base) an@razr15 8 →
Environment Info
- Platform: linux
- Terminal: gnome-terminal
- Version: 1.0.11
- Feedback ID: 3c5416d3-6892-4210-ac07-08b894170ecd
Errors
[]This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗