How to get supervisord to restart hung workers? : <p>I have a number of Python workers managed by supervisord that should continuously print to stdout (after each completed task) if they are working properly. However, they tend to hang, and we've had difficulty finding the bug. Ideally supervisord would notice that they haven't printed in X minutes and restart them; the tasks are idempotent, so non-graceful restarts are fine. Is there any supervisord feature or addon that can do this? Or another supervisor-like program that has this out of the box?</p>

<p>We are already using <a href="http://superlance.readthedocs.io/en/latest/memmon.html" rel="noreferrer">http://superlance.readthedocs.io/en/latest/memmon.html</a> to kill if memory usage skyrockets, which mitigates some of the hangs, but a hang that doesn't cause a memory leak can still cause the workers to reach a standstill.</p>
