FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
See original GitHub issueHi, when i try to do yarn run build
have the next error:
=> Copying public directory...
=> [✓] Public directory copied: 2.035ms
=> Building Routes...
=> [✓] Routes Built: 224.641ms
=> Bundling App...
=> [✓] App Bundled: 78788.254ms
=> Fetching Site Data...
=> [✓] Site Data Downloaded: 0.173ms
=> Fetching Route Data...
=> [=======] 7/7 100% 7000/s 0.0s
=> [✓] Route Data Downloaded: 5.108ms
=> Exporting Route Data...
=> [✓] Route Data Exported: 1.069ms
<--- Last few GCs --->
[5656:0x102801e00] 347957 ms: Mark-sweep 1315.5 (1430.8) -> 1315.4 (1430.8) MB, 1772.7 / 0.0 ms allocation failure GC in old space requested
[5656:0x102801e00] 349929 ms: Mark-sweep 1315.4 (1430.8) -> 1315.4 (1424.3) MB, 1971.4 / 0.0 ms last resort GC in old space requested
[5656:0x102801e00] 351926 ms: Mark-sweep 1315.4 (1424.3) -> 1315.4 (1419.8) MB, 1996.9 / 0.0 ms last resort GC in old space requested
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x178f483257c1 <JSObject>
1: _append [/Users/mobile3/Desarrollo/Folder/proyect/node_modules/babel-generator/lib/buffer.js:~94] [pc=0x34b82f0da13](this=0x178f17b23041 <Buffer map = 0x178fb3745281>,str=0x178f4836a769 <String[1]: >,line=130105,column=0,identifierName=0x178f94502201 <null>,filename=0x178f94502201 <null>)
2: Identifier [/Users/mobile3/Desarrollo/Folder/proyect/node_modules/babel-generat...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::Abort() [/usr/local/bin/node]
2: node::FatalException(v8::Isolate*, v8::Local<v8::Value>, v8::Local<v8::Message>) [/usr/local/bin/node]
3: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/usr/local/bin/node]
4: v8::internal::Factory::NewUninitializedFixedArray(int) [/usr/local/bin/node]
5: v8::internal::(anonymous namespace)::ElementsAccessorBase<v8::internal::(anonymous namespace)::FastPackedObjectElementsAccessor, v8::internal::(anonymous namespace)::ElementsKindTraits<(v8::internal::ElementsKind)2> >::GrowCapacity(v8::internal::Handle<v8::internal::JSObject>, unsigned int) [/usr/local/bin/node]
6: v8::internal::Runtime_GrowArrayElements(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/local/bin/node]
7: 0x34b824042fd
8: 0x34b82f0da13
9: 0x34b82f3d7b5
10: 0x34b8240535f
✨ Done in 357.19s.
I have tried to add bluebird Promise.map, return empty data and only one static route but crash continue.
Environment
react-static -V: 5.9.7
node -v
: 8.11.1yarn --version or npm -v: 1.6.0
Operating system: MacOS High Sierra v10.13.5
I cant share my repository but if need more info ask me.
Any ideas about it? Thanks
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed ...
Your code works fine for me with Node.js 0.10.28. It took 1200 MB of virtual memory and printed an unbelievable amount of junk...
Read more >JavaScript heap out of memory - Snyk Support
FATAL ERROR : CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of ... You can increase the amount of memory allocated to the command...
Read more >How to resolve - FATAL ERROR: CALL_AND_RETRY_LAST ...
FATAL ERROR : CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory How to get rid of this issue?Is it related to physical ......
Read more >How to solve JavaScript heap out of memory error
The fatal error says JavaScript heap out of memory as seen below: FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out ...
Read more >FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed
I'm trying to deploy my app but I'm getting this error: 7:13:48 PM: Creating an ... Allocation failed - JavaScript heap out of...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ll be pushing another beta release soon. Stay tuned.
Hey,
I’m experiencing this issue on a react-static 7.0.9 projet while trying to export 50k pages with the same template and same data (was doing a stress test to get an idea of the build time). Runs fine with 10k though. Noticed if I set the maxThreads option to 1 I don’t get the error but it is much slower.
Is there anything I can do ? I’ve already tried to set the node max memory to something bigger with no success.
Thanks !