-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
We have a situation where, for some reason, a forked child disappears (finishes, dies, doesn't matter) but the parent is never notified and therefore a new process can never be launched by that worker.
We can see in the docs how you can match up parents and children and send a signal to the parent to kill the child and continue on. However, there doesn't seem to be a way to notify a parent that the child is long gone and to continue on.
The parent appears to be waiting here, never to return:
https://github.com/defunkt/resque/blob/master/lib/resque/worker.rb#L121
(v1.11.0)
And if you kill off a parent, you've now decremented your worker count by one and can't get it back without restarting all workers.
Is there an easier solution than rewriting the rake task to look for this situation and replace a dead worker with a new one in the threads array in lib/resque/tasks.rb?
Thanks very much for any pointers.