diff --git a/gitlab-webservice/configuration/puma.rb b/gitlab-webservice/configuration/puma.rb index a1b5071d5e8f061d3128c0be165abf257b949651..c0b4ab4cd04e87f8ba781bf05f36c09e100f9c7b 100644 --- a/gitlab-webservice/configuration/puma.rb +++ b/gitlab-webservice/configuration/puma.rb @@ -111,8 +111,12 @@ worker_timeout (ENV['WORKER_TIMEOUT'] ||= '60').to_i # https://github.com/puma/puma/blob/master/5.0-Upgrade.md#lower-latency-better-throughput wait_for_less_busy_worker (ENV['PUMA_WAIT_FOR_LESS_BUSY_WORKER'] ||= '0.001').to_f +# nakayoshi_fork was removed in Puma 6.0: https://github.com/puma/puma/issues/2258 # https://github.com/puma/puma/blob/master/5.0-Upgrade.md#nakayoshi_fork -nakayoshi_fork unless ENV['DISABLE_PUMA_NAKAYOSHI_FORK'] == 'true' +if Gem::Version.new(Puma::Const::PUMA_VERSION).canonical_segments.first == 5 && + ENV['DISABLE_PUMA_NAKAYOSHI_FORK'] != 'true' + nakayoshi_fork +end # Use json formatter require_relative "/srv/gitlab/lib/gitlab/puma_logging/json_formatter"