Friday 2 June 2017

Kill nodejs process without restart

I have three Node.js projects that I run under screen -r (while testing). They ran for a long time without problems - I could easily shut them down with Ctrl+C and start them again. My problem is that now I can't shut them down.

I started the projects with a simple Node.js command:

nodejs index.js > storage/console.log 2> storage/error.log

It seems like that the processes were stuck in the background. The screen window got terminated after a server restart, but as soon as Ubuntu started, all the projects started to run again.

I tried to kill them with kill -9 {id} and killall nodejs, I even tried to shut them down in htop, but they restarted anyway. Additionally, it seems like one project is running in several instances at a time, thus my CPU is on 100% all the time.

Can somebody help me on this issue?



via Morgan3329

No comments:

Post a Comment