summaryrefslogtreecommitdiff
path: root/config/puma.rb.example
diff options
context:
space:
mode:
Diffstat (limited to 'config/puma.rb.example')
-rw-r--r--config/puma.rb.example12
1 files changed, 11 insertions, 1 deletions
diff --git a/config/puma.rb.example b/config/puma.rb.example
index cd7adca157f..9fc354a8fe8 100644
--- a/config/puma.rb.example
+++ b/config/puma.rb.example
@@ -69,10 +69,20 @@ tag 'gitlab-puma-worker'
#
worker_timeout 60
+# https://github.com/puma/puma/blob/master/5.0-Upgrade.md#lower-latency-better-throughput
+if defined?(wait_for_less_busy_worker)
+ wait_for_less_busy_worker ENV.fetch('PUMA_WAIT_FOR_LESS_BUSY_WORKER', 0.001).to_f
+end
+
+# https://github.com/puma/puma/blob/master/5.0-Upgrade.md#nakayoshi_fork
+if defined?(nakayoshi_fork)
+ nakayoshi_fork unless ENV['DISABLE_PUMA_NAKAYOSHI_FORK'] == 'true'
+end
+
# Use json formatter
require_relative "/home/git/gitlab/lib/gitlab/puma_logging/json_formatter"
json_formatter = Gitlab::PumaLogging::JSONFormatter.new
log_formatter do |str|
json_formatter.call(str)
-end \ No newline at end of file
+end