-
Notifications
You must be signed in to change notification settings - Fork 29.1k
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: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory #11337
Comments
I'm going to close the issue because it's most likely not an issue with node.js itself. Please post questions to https://github.com/nodejs/help/issues. To give you some pointers: you can increase the heap size with |
@bnoordhuis how is this not an issue with node itself? The failure is pointing at bin/node... v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/usr/local/bin/node] I have been searching for the fix for a few weeks now and reading through the same issues still seeing no permanent solution to heap allocation in node. |
You're confusing the messenger with the message. Take a look at the JS stack trace, it hints at the fact that jsdom is allocating too much memory. |
<--- Last few GCs --->
174442 ms: Mark-sweep 1296.4 (1410.1) -> 1296.2 (1417.1) MB, 1277.8 / 0.0 ms [allocation failure] [GC in old space requested].
175737 ms: Mark-sweep 1296.2 (1417.1) -> 1298.1 (1417.1) MB, 1294.3 / 0.0 ms [allocation failure] [GC in old space requested].
177043 ms: Mark-sweep 1298.1 (1417.1) -> 1304.4 (1410.1) MB, 1305.8 / 0.0 ms [last resort gc].
178394 ms: Mark-sweep 1304.4 (1410.1) -> 1310.7 (1410.1) MB, 1351.3 / 0.0 ms [last resort gc].
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0xe4ac4fcfb51
5: get nodeName [/var/local/bot/node_modules/jsdom/lib/jsdom/living/nodes/Node-impl.js:~111] [pc=0x2c58704c2f92] (this=0x654cb5d31f9 <an EventTargetImpl with map 0x3ad8b147ed29>)
9: _attach [/var/local/bot/node_modules/jsdom/lib/jsdom/living/nodes/Element-impl.js:~102] [pc=0x2c58705cc055] (this=0x654cb5d31f9 <an EventTargetImpl with map 0x3ad8b147ed29>)
10: _attach [/var/local/bot/nod...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::Abort() [/usr/bin/node]
2: 0x10b084c [/usr/bin/node]
3: v8::Utils::ReportApiFailure(char const*, char const*) [/usr/bin/node]
4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/usr/bin/node]
5: v8::internal::Factory::NewOneByteInternalizedString(v8::internal::Vector, unsigned int) [/usr/bin/node]
6: v8::internal::AstRawStringInternalizationKey::AsHandle(v8::internal::Isolate*) [/usr/bin/node]
7: v8::internal::StringTable::LookupKey(v8::internal::Isolate*, v8::internal::HashTableKey*) [/usr/bin/node]
8: v8::internal::AstRawString::Internalize(v8::internal::Isolate*) [/usr/bin/node]
9: v8::internal::AstValueFactory::Internalize(v8::internal::Isolate*) [/usr/bin/node]
10: v8::internal::Parser::Internalize(v8::internal::Isolate*, v8::internal::Handlev8::internal::Script, bool) [/usr/bin/node]
11: v8::internal::Parser::Parse(v8::internal::ParseInfo*) [/usr/bin/node]
12: v8::internal::Parser::ParseStatic(v8::internal::ParseInfo*) [/usr/bin/node]
13: 0xb5473e [/usr/bin/node]
14: 0xb5c106 [/usr/bin/node]
15: v8::internal::Compiler::Compile(v8::internal::Handlev8::internal::JSFunction, v8::internal::Compiler::ClearExceptionFlag) [/usr/bin/node]
16: v8::internal::Runtime_CompileLazy(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/bin/node]
17: 0x2c586d9092a7
Aborted (core dumped)
Is there are some mechanisms to protect node.js runtime from out of memory?
As i understand, there can be problems with setInterval and active references. Garbage collector doesn't delete them as i remember. Data is not collected if there at least one reference to them as i remember.
Or it's up to coders to control how much memory left and avoid going over overall memory?
Is there some aggressive garbage collection features implemented in node.js for such critical "out of memory" situations?
The text was updated successfully, but these errors were encountered: