My case is this:
I am running a node.js server at domain.com:54321
The command I use to start the server is:
forever start -l forever.log -a -o out.log -e err.log index.js
However, there are some cases where our code gets into a high demanding function, causing the script to work very slow or unresponsive. We are trying to optimize it.
In that case, I stop the server, and start a new one if needed, lets say domain.com:67890
forever stop 0
But if I want to start again the recently stopped node.js server domain.com:54321
(or restart it instead of stopping it) with this, I was expecting the processes to stop and run as fresh and fast again.
The thing that if I start it again, or restart it, it continues to go high on resources. I found out that I need to leave it for a couple of hours to start it again.
My question is, are there any other commands that will make sure that every instance, resource of that server is stopped, so I can start using it again immediately?
Thank you