Method: Puma::DSL#queue_requests

Defined in:
lib/puma/dsl.rb

#queue_requests(answer = true) ⇒ Object

When set to true, workers accept all requests and queue them before passing them to the handlers. When set to false, each worker process accepts exactly as many requests as it is configured to simultaneously handle.

Queueing requests generally improves performance. In some cases, such as a single threaded application, it may be better to ensure requests get balanced across workers.

Note that setting this to false disables HTTP keepalive and slow clients will occupy a handler thread while the request is being sent. A reverse proxy, such as nginx, can handle slow clients and queue requests before they reach Puma.

The default is true.

See Also:



1212
1213
1214
# File 'lib/puma/dsl.rb', line 1212

def queue_requests(answer=true)
  @options[:queue_requests] = answer
end