diff --git a/lib/puma/request.rb b/lib/puma/request.rb index 19f8c7dd..69dddfd6 100644 --- a/lib/puma/request.rb +++ b/lib/puma/request.rb @@ -165,8 +165,7 @@ def prepare_response(status, headers, res_body, requests, client) # This allows Puma to service connections fairly when the number # of concurrent connections exceeds the size of the threadpool. force_keep_alive = if @enable_keep_alives - client.requests_served < @max_fast_inline || - @thread_pool.busy_threads < @max_threads + client.requests_served < @max_keep_alive else # Always set force_keep_alive to false if the server has keep-alives not enabled. false @@ -580,7 +579,7 @@ def fetch_status_code(status) # response body # @param io_buffer [Puma::IOBuffer] modified inn place # @param force_keep_alive [Boolean] 'anded' with keep_alive, based on system - # status and `@max_fast_inline` + # status and `@max_keep_alive` # @return [Hash] resp_info # @version 5.0.3 # diff --git a/lib/puma/server.rb b/lib/puma/server.rb index 5f796039..6bed9d0f 100644 --- a/lib/puma/server.rb +++ b/lib/puma/server.rb @@ -95,7 +95,7 @@ def initialize(app, events = nil, options = {}) @min_threads = @options[:min_threads] @max_threads = @options[:max_threads] @queue_requests = @options[:queue_requests] - @max_fast_inline = @options[:max_fast_inline] + @max_keep_alive = @options[:max_fast_inline] @enable_keep_alives = @options[:enable_keep_alives] @enable_keep_alives &&= @queue_requests @io_selector_backend = @options[:io_selector_backend]