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.
1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 |
# File 'lib/puma/dsl.rb', line 1198 def worker_timeout(timeout) timeout = Integer(timeout) min = @options.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 @options[:worker_timeout] = timeout end |