So recently I've been using PM2, and in terms of functionality and such, it's working perfectly.
However, I've noticed that if I leave my node app running over night and check it in the morning, it jumps in "restart" count about 20 times.
For example, I've only had it on the server for the past couple of days and the restart count is 100+.
There are no error logs, the output logs look fine and have nothing dodgy. So I'm not sure what is causing this.
The app itself runs fine if you access it, but I've found it's never good practice to leave something like this unfixed.
Perhaps it could be a memory leak or something? If someone could point me in the right direction that would be really helpful.
I'm not really sure what to provide, so if needed let me know and I can provide my config/error files and such for PM2.
Thanks.
May be there is a memory leak in your app and it is running out of memory while processing/running try increasing the memory like this.
PM2 start --name my-process --max-memory-restart 5000M index.js