馃悰 [Bug] JavaScript heap out of memory in production
Created by: Tirokk
Authored by mattwr18 Closed
馃悰 Bugreport
We are getting this error in production... and our backend pod is restarting quite often
<--- Last few GCs --->
[27:0x564648c17ca0] 473806 ms: Mark-sweep 2039.9 (2057.7) -> 2038.4 (2058.0) MB, 4118.8 / 0.0 ms (average mu = 0.075, current mu = 0.004) allocation failure scavenge might not succeed
[27:0x564648c17ca0] 478008 ms: Mark-sweep 2040.7 (2058.0) -> 2039.9 (2059.2) MB, 4194.6 / 0.0 ms (average mu = 0.039, current mu = 0.002) allocation failure scavenge might not succeed
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 0x5646465edcd9]
Security context: 0x33bde73c08a1
1: dataState [0x1e88dc66509] [/nitro-backend/node_modules/parse5/lib/tokenizer/index.js:~619] [pc=0x1166b1a976d8](this=0x2a4a508b6389 ,65533)
2: /* anonymous */ [0x1e88dc7a609] [/nitro-backend/node_modules/parse5/lib/parser/index.js:~389] [pc=0x1166b1acfe1a](this=0x2a4a508b6409 ,0x2f0d76d801b1 )
3: /* anonymous */ [0x1e8...
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
Writing Node.js report to file: report.20191221.213718.27.0.001.json
Node.js report completed
error Command failed with signal "SIGABRT".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I have found this issue in the github page of parse5
https://github.com/inikulin/parse5/issues/276, which gives us a clue of where to start trying a fix