Reputation: 95
I'm running my Node JS process through forever as below:
sudo forever start -o out.log -e error.log myServer.js
I want to change the memory limit of my NodeJs server as I do like below when I'm running it purely with node.
node --max-old-space-size=512 myServer.js
How I can do the same when I'm running it with forever? Is there some way like 'forever start --max-old-space-size=512'
Upvotes: 8
Views: 12160
Reputation: 36319
You can pass node options by changing the command (which defaults to "node").
So for example:
sudo forever start -c "node --max_old_space_size=512" -o out.log -e error.log myServer.js
Upvotes: 14