node.js - Font generation with webfont: FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory -
i run my script use webfont
on directory 41214
svg files , got following error
function buildfont(config) { return webfont({ files: config.inputfiles, fontname: config.fontname }) .then(content => content) .catch(err => { console.log(err); }); } ```
error
node --require babel-core/register ./index.js exists <--- last few gcs ---> 232006 ms: mark-sweep 1350.0 (1406.9) -> 1349.8 (1406.9) mb, 574.3 / 0.0 ms [allocation failure] [gc in old space requested]. 232583 ms: mark-sweep 1349.8 (1406.9) -> 1349.8 (1406.9) mb, 576.6 / 0.0 ms [allocation failure] [gc in old space requested]. 233164 ms: mark-sweep 1349.8 (1406.9) -> 1349.8 (1403.9) mb, 580.3 / 0.0 ms [last resort gc]. 233745 ms: mark-sweep 1349.8 (1403.9) -> 1349.7 (1403.9) mb, 580.3 / 0.0 ms [last resort gc]. <--- js stacktrace ---> ==== js stack trace ========================================= 2: arguments adaptor frame: 2->1 security context: 0x4e54c9cfb39 <js object> 3: round [/data/projects/hanzi-pinyin-font/node_modules/svg-pathdata/src/svgpathdata.js:12] [pc=0x26e3767b3b09] (this=0x217c839e5e99 <an svgpathdata map 0x375d0749d7b1>) 4: arguments adaptor frame: 1->0 5: /* anonymous */(aka /* anonymous */) [/data/projects/hanzi-pinyin-font/node_modules/svgicons2svgfont/src/index.js:336] [pc=0x26e376698166]... fatal error: call_and_retry_last allocation failed - javascript heap out of memory 1: node::abort() [node] 2: 0x109b1dc [node] 3: v8::utils::reportapifailure(char const*, char const*) [node] 4: v8::internal::v8::fatalprocessoutofmemory(char const*, bool) [node] 5: v8::internal::factory::newfixedarray(int, v8::internal::pretenureflag) [node] 6: v8::internal::deoptimizationoutputdata::new(v8::internal::isolate*, int, v8::internal::pretenureflag) [node] [node] 7: v8::internal::fullcodegenerator::populatedeoptimizationdata(v8::internal::handle<v8::internal::code>) [node] 8: v8::internal::fullcodegenerator::makecode(v8::internal::compilationinfo*) [node] 9: v8::internal::compiler::ensuredeoptimizationsupport(v8::internal::compilationinfo*) [node] 10: 0xb538d7 [node] 11: 0xb54d4d [node] 12: v8::internal::compiler::compileoptimized(v8::internal::handle<v8::internal::jsfunction>, v8::internal::compiler::concurrencymode) [node] 13: v8::internal::runtime_compileoptimized_concurrent(int, v8::internal::object**, v8::internal::isolate*) [node] 14: 0x26e374e092a7 aborted error command failed exit code 134.
question
how can solve this?
@edouard-lopez due large number of files node exceeded limit memory (
512mb
) default. can try increase memory, see http://prestonparry.com/articles/increasenodejsmemorysize/
Comments
Post a Comment