-
Notifications
You must be signed in to change notification settings - Fork 29.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nodejs process restart doesn't kill child threads and they become zombie process. #14445
Comments
Any reason to report that here and not against forever? |
Because forever has nothing to do with this bug, what forever do is managing the process not the threads, but when you restart process by sending |
Then you (where you = forever or your script) should send a signal to the process group, not just the master process. SIGKILL kills a process without giving it any chance to clean up. That has nothing to do with node.js and everything with UNIX process management. |
I'll close this out, the previous comment said all there is to say. If you still feel this is a node.js bug, please post a standalone test case (i.e., without forever.) |
@gaurav-moonfroglabs normally a cluster worker exits when the master closes the IPC socket it uses to talk to it. Not sure why v6 would behave differently than v4 for you (my simple little test worked, the workers exited when the master was killed with SIGKILL). You might try to trace what the workers are doing to not react to the socket closing.
outputs
|
Hi,
We are using forever to start our nodejs server. We have been using cluster module. So whenever we restart the process using forever restart, so we see that process gets restarted and new workers gets created but sometimes old workers are still running and i see they are consuming some memory but no cpu and not processing anything (as i have put logs to print worker id for every request processing).
The text was updated successfully, but these errors were encountered: