Skip to content

Children disappear but parents remain stuck in wait state #180

@kelaita

Description

@kelaita

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions