Skip to content

Instantly share code, notes, and snippets.

@ivan-loh
Last active March 3, 2021 13:26
Show Gist options
  • Select an option

  • Save ivan-loh/ee0d96c3795e59244063 to your computer and use it in GitHub Desktop.

Select an option

Save ivan-loh/ee0d96c3795e59244063 to your computer and use it in GitHub Desktop.

Revisions

  1. ivan-loh revised this gist Nov 3, 2015. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,14 +1,15 @@
    # Node
    # Plain Ol' Node
    node --max-old-space-size=1024 app.js # increase to 1gb
    node --max-old-space-size=2048 app.js # increase to 2gb
    node --max-old-space-size=3072 app.js # increase to 3gb
    node --max-old-space-size=4096 app.js # increase to 4gb
    node --max-old-space-size=5120 app.js # increase to 5gb
    node --max-old-space-size=6144 app.js # increase to 6gb

    # For pm2
    pm2 start app.js --node-args="--max-old-space-size=1024" # increase to 1gb
    pm2 start app.js --node-args="--max-old-space-size=2048" # increase to 2gb
    pm2 start app.js --node-args="--max-old-space-size=3072" # increase to 3gb
    pm2 start app.js --node-args="--max-old-space-size=4096" # increase to 4gb
    pm2 start app.js --node-args="--max-old-space-size=5120" # increase to 5gb
    pm2 start app.js --node-args="--max-old-space-size=6144"
    pm2 start app.js --node-args="--max-old-space-size=6144" # increase to 6gb
  2. ivan-loh created this gist Nov 3, 2015.
    14 changes: 14 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    # Node
    node --max-old-space-size=1024 app.js # increase to 1gb
    node --max-old-space-size=2048 app.js # increase to 2gb
    node --max-old-space-size=3072 app.js # increase to 3gb
    node --max-old-space-size=4096 app.js # increase to 4gb
    node --max-old-space-size=5120 app.js # increase to 5gb
    node --max-old-space-size=6144 app.js # increase to 6gb

    pm2 start app.js --node-args="--max-old-space-size=1024" # increase to 1gb
    pm2 start app.js --node-args="--max-old-space-size=2048" # increase to 2gb
    pm2 start app.js --node-args="--max-old-space-size=3072" # increase to 3gb
    pm2 start app.js --node-args="--max-old-space-size=4096" # increase to 4gb
    pm2 start app.js --node-args="--max-old-space-size=5120" # increase to 5gb
    pm2 start app.js --node-args="--max-old-space-size=6144"