简体   繁体   中英

Can I tell node to use a bigger heap?

I'm not sure how to fix this. What does it all mean? Can I somehow tell node to use a bigger heap?

plato -r -d report project-ui

<--- Last few GCs --->

30399 ms: Scavenge 1400.3 (1472.6) -> 1400.3 (1472.6) MB, 0.5 / 0 ms (+ 2.7 ms in 1 steps since last GC) [allocation failure] [incremental marking delaying mark-sweep]. 30416 ms: Mark-sweep 1400.3 (1472.6) -> 1400.3 (1472.6) MB, 17.0 / 0 ms (+ 4.8 ms in 7 steps since start of marking, biggest step 2.7 ms) [last resort gc]. 30430 ms: Mark-sweep 1400.3 (1472.6) -> 1400.3 (1472.6) MB, 14.2 / 0 ms [last resort gc].

<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x3b8b68d37399 1: Join(aka Join) [native array.js:154] [pc=0x11dbae18bf38] (this=0x3b8b68d04131 ,o=0x28d3fc8bf931 ,v=3598,C=0x3b8b68d65a91 ,B=0x28d3fc867d31 ) 2: InnerArrayJoin(aka InnerArrayJoin) [native array.js:331] [pc=0x11dbae18adaa] (this=0x3b8b68d04131 ,C=0x3b8b68d65a91

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory [1] 57084 abort plato -r -d report project-ui

if you're on windows try this

node --max_old_space_size=4096 %AppData%\npm\node_modules\plato\bin\plato -r -d report project-ui

if you're on unix try this

node --max_old_space_size=4096 /usr/local/lib/node_modules/plato/bin/plato -r -d report project-ui

where 4096 is the memory in megabytes.

Also make sure that you're using the 64-bit version of node because 32-bit applications can't allocate more than 4GBs of RAM.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM