Skip to content

Instantly share code, notes, and snippets.

@srikanthjeeva
Last active April 18, 2016 19:25
Show Gist options
  • Save srikanthjeeva/ef8c17380af80797a32175bd446ee2d1 to your computer and use it in GitHub Desktop.
Save srikanthjeeva/ef8c17380af80797a32175bd446ee2d1 to your computer and use it in GitHub Desktop.
Increase memory for node.js server
//while starting server pass --max-old-space-size=1024.
//this allocates 1024MB to node.js which is 1GB. Increase the number according to your hardware needs.
node --max-old-space-size=1024 controllers/aggregate_counters.js
// if using forever
forever start -c 'node --max-old-space-size=1024' your_script.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment