Skip to content
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

Graceful vs forceful killing strategy seems backwards? #41

Open
JamesMGreene opened this issue Mar 26, 2021 · 2 comments
Open

Graceful vs forceful killing strategy seems backwards? #41

JamesMGreene opened this issue Mar 26, 2021 · 2 comments

Comments

@JamesMGreene
Copy link

According to the Node.js docs on worker.kill:

Because worker.kill() attempts to gracefully disconnect the worker process, it is susceptible to waiting indefinitely for the disconnect to complete. For example, if the worker enters an infinite loop, a graceful disconnect will never occur. If the graceful disconnect behavior is not needed, use worker.process.kill().

@JamesMGreene JamesMGreene changed the title Graceful vs forceful killing strategy is backwards Graceful vs forceful killing strategy seems backwards? Mar 26, 2021
@JamesMGreene
Copy link
Author

JamesMGreene commented Mar 26, 2021

I suppose this may be related to the Node.js cluster module's shortcomings, e.g. the "cluster" section of nodejs/node#33715 🤔

There is a current attempt underway to normalize this a bit more: nodejs/node#34312

@namoscato
Copy link

I'm running into what I think is a related issue with orphaned child processes post-shutdown per this complex example.

Should child worker process invoke process.exit() after disconnect()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants