• Poul-Henning Kamp's avatar
    Add a watchdog to worker pools. · ddac7e41
    Poul-Henning Kamp authored
    If the worker pool is configured too small, it can deadlock.
    
    Recovering from this would require a lot of complicated code, to
    discover queued but unscheduled tasks which can be cancelled
    (because the client went away or otherwise) and code to do the
    cancelling etc. etc.
    
    But fundamentally either people configured their pools wrong, in
    which case we want them to notice, or they are under DoS, in which
    case recovering gracefully is unlikely be a major improvement over
    a restart.
    
    Instead we implement a per-pool watchdog and kill the child process
    if nothing has been dequeued for too long.
    
    Default value 10 seconds, open to discussion.
    
    Band-aid for:	#2418
    
    Test-case by:	@Dridi
    ddac7e41
r02418.vtc 1.29 KB