Skip to content

Instantly share code, notes, and snippets.

@peschee
Created March 7, 2016 18:43
Show Gist options
  • Save peschee/50873ff347dfe370e35e to your computer and use it in GitHub Desktop.
Save peschee/50873ff347dfe370e35e to your computer and use it in GitHub Desktop.
By default the member limit on Node js is 512 mb. This will cause FATAL ERROR- JS Allocation failed – process out of memory when processing large data files. It can be avoided by increasing the memory limit.
node --max-old-space-size=1024 my-node-script.js # increase to 1gb
node --max-old-space-size=2048 my-node-script.js # increase to 2gb
node --max-old-space-size=3072 my-node-script.js # increase to 3gb
node --max-old-space-size=4096 my-node-script.js # increase to 4gb
node --max-old-space-size=5120 my-node-script.js # increase to 5gb
node --max-old-space-size=6144 my-node-script.js # increase to 6gb
node --max-old-space-size=7168 my-node-script.js # increase to 7gb
node --max-old-space-size=8192 my-node-script.js # increase to 8gb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment