JavaScript heap out of memory

i got this error recently in all my projects and i couldnt find any solution to it

//////error

<— Last few GCs —>

[121:0x3ee5960]   400626 ms: Scavenge (reduce) 1600.7 (1634.2) -> 1600.4 (1634.7) MB, 5.9 / 0.0 ms  (average mu = 0.328, current mu = 0.286) allocation failure; 
[121:0x3ee5960]   400682 ms: Scavenge (reduce) 1601.0 (1634.7) -> 1600.7 (1635.0) MB, 6.6 / 0.0 ms  (average mu = 0.328, current mu = 0.286) task; 
[121:0x3ee5960]   400749 ms: Scavenge (reduce) 1601.6 (1635.0) -> 1601.2 (1635.5) MB, 5.5 / 0.0 ms  (average mu = 0.328, current mu = 0.286) allocation failure; 


<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0xaaaef8 node::Abort() [node]
 2: 0x9955e0  [node]
 3: 0xca45c0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
 4: 0xca498a v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
 5: 0xe888c5  [node]
 6: 0xe889a5  [node]
 7: 0xe9d719 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const*, v8::GCCallbackFlags) [node]
 8: 0xe9e682 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
 9: 0xe79ea6 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
10: 0xe7b253 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
11: 0xe5b60d v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]
12: 0x125267a v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
13: 0x169a8f9  [node]
repl process died unexpectedly: signal: aborted (core dumped)


Hi @disc79, welcome to the forums! Could you send a link to a Repl where you are experiencing this issue so we can investigate :smile:

2 Likes