Answer the question
In order to leave comments, you need to log in
Node.js cpu ram leak?
After some time, after 2-3 days, the processes of the node begin to eat more and more cpu and RAM.
I run 9 processes in the cluster with 0.3% RAM each and 3% cpu each. but after a week they are already eating 5% RAM and 10% cpu each, and it keeps growing and growing until you reboot the scripts.
I run the script with the --expose-gc flag:
forever --nouse-idle-notification --expose-gc --max-new-space-size=2048 --max-old-space-size=8192 start -l forever.log -a -e err.log index.js -p 3000 -h xxx.xxx.xxx.xx
Answer the question
In order to leave comments, you need to log in
This is called aging. Most likely, you are forgetting some variables.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question