mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Enforce a minimum worker_timeout
This fixes a termination loop when the workers don't report in fast enough. Fixes #1714.
This commit is contained in:
parent
36964ec429
commit
64db36c01e
1 changed files with 7 additions and 0 deletions
|
@ -434,6 +434,13 @@ module Puma
|
|||
# that have not checked in within the given +timeout+.
|
||||
# This mitigates hung processes. Default value is 60 seconds.
|
||||
def worker_timeout(timeout)
|
||||
timeout = Integer(timeout)
|
||||
min = Cluster::WORKER_CHECK_INTERVAL
|
||||
|
||||
if timeout <= min
|
||||
raise "The minimum worker_timeout must be greater than the worker reporting interval (#{min})"
|
||||
end
|
||||
|
||||
@options[:worker_timeout] = Integer(timeout)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue