Fmstrat/plex-cluster

JavaScript heap out of memory

Opened this issue · 1 comments

im trying to fix that , but im not sure how

  Getting 1000 records starting at 63000
  Getting 1000 records starting at 64000
  Getting 1000 records starting at 65000
  Getting 1000 records starting at 66000
  Getting 1000 records starting at 67000
  Getting 1000 records starting at 68000
  Getting 1000 records starting at 69000
  Getting 1000 records starting at 70000
  Getting 1000 records starting at 71000
  Getting 1000 records starting at 72000
  Getting 1000 records starting at 73000

<--- Last few GCs --->

[18:0x55ee99d69c60]   158559 ms: Mark-sweep 2046.0 (2050.8) -> 2045.4 (2051.1) MB, 3764.2 / 0.0 ms  (average mu = 0.047, current mu = 0.002) allocation failure scavenge might not succeed


<--- JS stacktrace --->

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

    0: ExitFrame [pc: 0x55ee95460439]
    1: StubFrame [pc: 0x55ee954a0899]
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
Security context: 0x1815f9f80921 <JSObject>
    2: match [0x1815f9f8cc81](this=0x04351f357ce9 <String[2]\: \n\n>,0x04351f357f11 <JSRegExp <String[#5]: ^\s*$>>)
    3: /* anonymous */ [0x3df618b526d9] [/app/node_modules/xml2js/lib/parser.js:~173] [pc=0x92a5ecf7264](this=0x1253185f8f81 <SAXParser map = 0x1c0062bfae11>)
    4: closeTag [0x3df0ccac02a1] [/app/node_mod...

that docker env seem to fix the issue

    environment:
      - NODE_OPTIONS="--max-old-space-size=8192" #(8gb)
        - NODE_OPTIONS="--max-old-space-size=2048" #(2gb)
        - NODE_OPTIONS="--max-old-space-size=4096" #(4gb)
        - NODE_OPTIONS="--max-old-space-size=8192"  #(8gb)