1

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

1: node::Abort() 2: 0x10a03cc 3: v8::Utils::ReportApiFailure(char const*, char const*) 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) 5: v8::internal::Factory::NewTransitionArray(int) 6: v8::internal::TransitionArray::Insert(v8::internal::Handle, v8::internal::Handle, v8::internal::Handle, v8::internal::SimpleTransitionFlag) 7: v8::internal::Map::CopyReplaceDescriptors(v8::internal::Handle, v8::internal::Handle, v8::internal::Handle, v8::internal::TransitionFlag, v8::internal::MaybeHandle, char const*, v8::internal::SimpleTransitionFlag) 8: v8::internal::Map::CopyAddDescriptor(v8::internal::Handle, v8::internal::Descriptor*, v8::internal::TransitionFlag) 9: v8::internal::Map::CopyWithConstant(v8::internal::Handle, v8::internal::Handle, v8::internal::Handle, v8::internal::PropertyAttributes, v8::internal::TransitionFlag) 10: v8::internal::Map::TransitionToDataProperty(v8::internal::Handle, v8::internal::Handle, v8::internal::Handle, v8::internal::PropertyAttributes, v8::internal::Object::StoreFromKeyed) 11: v8::internal::LookupIterator::PrepareTransitionToDataProperty(v8::internal::Handle, v8::internal::Handle, v8::internal::PropertyAttributes, v8::internal::Object::StoreFromKeyed) 12: v8::internal::StoreIC::LookupForWrite(v8::internal::LookupIterator*, v8::internal::Handle, v8::internal::Object::StoreFromKeyed) 13: v8::internal::StoreIC::UpdateCaches(v8::internal::LookupIterator*, v8::internal::Handle, v8::internal::Object::StoreFromKeyed) 14: v8::internal::StoreIC::Store(v8::internal::Handle, v8::internal::Handle, v8::internal::Handle, v8::internal::Object::StoreFromKeyed) 15: v8::internal::KeyedStoreIC::Store(v8::internal::Handle, v8::internal::Handle, v8::internal::Handle) 16: v8::internal::Runtime_KeyedStoreIC_Miss(int, v8::internal::Object**, v8::internal::Isolate*) 17: 0x218d5a6092a7

  • check this answer: https://stackoverflow.com/questions/38558989/node-js-heap-out-of-memory/66914674#66914674 – sidverma Apr 02 '21 at 06:43

1 Answers1

0

Normally this happens when old space size of the heap is not enough to run the process due to extraordinary memory usage.

This can be fixed by increasing the old space size as below, when you start the node.js code in command line.

node --max-old-space-size=4096 index.js

Here i increased the --max-old-space-size to 4GB

Sahan Maldeniya
  • 1,028
  • 1
  • 14
  • 21