Reputation: 481
Need help for killing process node JS. I'm trying to stop node js process on my server, I've been use
killall -9 node
and here is the response
node(30332): Operation not permitted
node: no process found
So I used
sudo killall -9 node
but the node js is still respawning with different PID. Any help?
Upvotes: 2
Views: 1726
Reputation: 155
You can use process.kill()
or process.exit()
to kill/stop node process internally when there is stop request.
To stop all node process from command line use pkill node
(in linux).
Upvotes: 0
Reputation: 481
Finally found the problems, there are Parents ID that related to Node Process.
I'm using
ps -ef | grep no
and found the Parent Process ID / Sleep Process and kill the parents and then kill the node process.
Upvotes: 1