From 3acc58ff41e8a97cf1c6c2cf0049f243c16f5ef7 Mon Sep 17 00:00:00 2001 From: astrid Date: Fri, 5 Dec 2025 19:26:54 +0100 Subject: [PATCH 1/3] Add WEB_CONCURRENCY env support for Puma worker count --- config/puma.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/puma.rb b/config/puma.rb index 8d09b00ac..bc0e59587 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -25,7 +25,7 @@ if !Rails.env.local? # worker per CPU, 1 thread per worker and tune it from there. # # https://edgeguides.rubyonrails.org/tuning_performance_for_deployment.html#puma - workers Concurrent.physical_processor_count + workers ENV.fetch("WEB_CONCURRENCY", Concurrent.physical_processor_count).to_i threads 1, 1 # Tell the Ruby VM that we're finished booting up. From 430a0c612b0fbe231147b5c42a002a5d86fdc8bf Mon Sep 17 00:00:00 2001 From: ari Date: Fri, 5 Dec 2025 19:57:55 +0100 Subject: [PATCH 2/3] Update config/puma.rb (commit suggestion) Co-authored-by: Jeremy Daer --- config/puma.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/puma.rb b/config/puma.rb index bc0e59587..489ae0779 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -25,7 +25,7 @@ if !Rails.env.local? # worker per CPU, 1 thread per worker and tune it from there. # # https://edgeguides.rubyonrails.org/tuning_performance_for_deployment.html#puma - workers ENV.fetch("WEB_CONCURRENCY", Concurrent.physical_processor_count).to_i + workers Integer(ENV.fetch("WEB_CONCURRENCY") { Concurrent.physical_processor_count }) threads 1, 1 # Tell the Ruby VM that we're finished booting up. From fcce276dc912bf4dca482af9216fdea13fa13c84 Mon Sep 17 00:00:00 2001 From: astrid Date: Fri, 5 Dec 2025 20:20:13 +0100 Subject: [PATCH 3/3] Update JOB_CONCURRENCY to match upstream Rails --- config/queue.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/queue.yml b/config/queue.yml index 130b0d9bd..3f5615fa8 100644 --- a/config/queue.yml +++ b/config/queue.yml @@ -5,7 +5,7 @@ default: &default workers: - queues: [ "default", "solid_queue_recurring", "backend", "webhooks" ] threads: 3 - processes: <%= ENV.fetch("JOB_CONCURRENCY", Concurrent.physical_processor_count) %> + processes: <%= Integer(ENV.fetch("JOB_CONCURRENCY") { Concurrent.physical_processor_count }) %> polling_interval: 0.1 development: *default