Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory #1435

Closed
huan opened this issue Jul 1, 2018 · 10 comments

Comments

@huan
Copy link
Member

huan commented Jul 1, 2018

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: node::Abort() [node]
 2: 0x89375c [node]
 3: v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
 4: v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
 5: 0xe616b2 [node]
 6: v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [node]
 7: v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
 8: v8::internal::Heap::AllocateRawWithRetry(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [node]
 9: v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationSpace) [node]
10: v8::internal::Runtime_AllocateInNewSpace(int, v8::internal::Object**, v8::internal::Isolate*) [node]
11: 0x17b7da5841bd
12:56:22 WARN PuppetPadchat onPadchatMessageRoomEvent() case PadchatMesssageSys: inviterId found more than 1, use the first one.
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: node::Abort() [node]
 2: 0x89375c [node]
 3: v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
 4: v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
 5: 0xe616b2 [node]
 6: v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [node]
 7: v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
 8: v8::internal::Heap::AllocateRawWithRetry(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [node]
 9: v8::internal::Factory::NewRawOneByteString(int, v8::internal::PretenureFlag) [node]
10: v8::internal::String::SlowFlatten(v8::internal::Handle<v8::internal::ConsString>, v8::internal::PretenureFlag) [node]
11: v8::internal::String::Flatten(v8::internal::Handle<v8::internal::String>, v8::internal::PretenureFlag) [node]
12: v8::internal::Runtime_RegExpExecMultiple(int, v8::internal::Object**, v8::internal::Isolate*) [node]
13: 0x2dc749f041bd

See

By default the memory limit in Node js is 512mb/1.7GB(dependes on version, not confirmed). This will cause FATAL ERROR- JS Allocation failed – process out of memory when processing large data files. It can be avoided by increasing the memory limit.

@huan huan added the bug label Jul 1, 2018
@huan
Copy link
Member Author

huan commented Jul 2, 2018

node --max-old-space-size=3049 my-node-script.js

@huan
Copy link
Member Author

huan commented Jul 3, 2018

With TypeScript

node -r ts-node/register --max-old-space-size

See

@windmemory
Copy link
Member

How to increase the size with the docker image?

@huan
Copy link
Member Author

huan commented Jul 4, 2018

I'm still investigating with it and will let you know when I get any update of it by reply this issue.

@windmemory
Copy link
Member

Besides, when did you see the error got thrown? What was the operation that triggered this heap OOM?

@huan
Copy link
Member Author

huan commented Jul 9, 2018

I can reproduce this problem at any time.

What's your operation that triggered this heap oom?

@windmemory
Copy link
Member

Mine was doing contact.finaAll with name as an argument. And the problem fixed by changing the contact.findAll to contact.load with contactId

@huan
Copy link
Member Author

huan commented Jul 15, 2018

Close this issue because it seems had been fixed with the latest code.

@jayarjo
Copy link

jayarjo commented Nov 30, 2018

Hitting this with the version 2.1.1.

@najibkh
Copy link

najibkh commented Apr 25, 2019

node --max-old-space-size=4096 my-node-script.js

i tried it but i still got the error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants