Method: Puma::DSL#worker_timeout
- Defined in:
- lib/puma/dsl.rb
#worker_timeout(timeout) ⇒ Object
Note:
Cluster mode only.
Verifies that all workers have checked in to the master process within the given timeout. If not the worker process will be restarted. This is not a request timeout, it is to protect against a hung or dead process. Setting this value will not protect against slow requests.
This value must be greater than worker_check_interval.
The default is 60 seconds.
1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 |
# File 'lib/puma/dsl.rb', line 1135 def worker_timeout(timeout) timeout = Integer(timeout) min = .fetch(:worker_check_interval, Configuration::DEFAULTS[:worker_check_interval]) if timeout <= min raise "The minimum worker_timeout must be greater than the worker reporting interval (#{min})" end [:worker_timeout] = timeout end |