tn4foxxah
tn4foxxah

Reputation: 297

nodejs: forever not responding

So I know, it was not the most smartass idea, but I updated nodejs to version 0.10 with "n" while the server was still running with forever. Now when I try typing in

$ forever list

or

$ forever stopall

or

$ forever restartall

it simply does nothing. Anyways -

$ forever --help

still shows the help menu, but all actions won't work. And my nodejs Server is still responding!

Is there any method I can kill forever with fire?

Upvotes: 7

Views: 1211

Answers (3)

Abdul Hamid
Abdul Hamid

Reputation: 3252

You can use

sudo killall node  

OR

sudo forever stopall

If that too doesn't work simply use

sudo kill -9 $(ps aux | grep 'node' | awk '{print $2}') 

Hope this works

Upvotes: 2

tn4foxxah
tn4foxxah

Reputation: 297

Ok with a litte help i solved the problem:

Just type in

$ ps aux | less

and search for all processes that have to do something with nodejs and kill them with

$ kill -9 *PID HERE*

Upvotes: 0

Zane Claes
Zane Claes

Reputation: 14955

I've seen this problem in monitoring daemons in general, such as forever and hotnode. As you indicated, you can grep the pids of the lost processes. I went so far as to add killall node to my production boot script, actually (a little less wordy than your solution, and a bit overkill, but it's effectively solved the problem).

Upvotes: 0

Related Questions