Skip to content

Commit 142e6ab

Browse files
committed
Puma 5+ now pulls WEB_CONCURRENCY directly from ENV, so we cannot/should not override
Especially to introduce "auto", since Puma just explodes when trying to parse that. Need to upstream that feature.
1 parent 1e279be commit 142e6ab

File tree

1 file changed

+0
-13
lines changed
  • railties/lib/rails/generators/rails/app/templates/config

1 file changed

+0
-13
lines changed

railties/lib/rails/generators/rails/app/templates/config/puma.rb.tt

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,6 @@ environment rails_env
3232

3333
case rails_env
3434
when "production"
35-
# If you are running more than 1 thread per process, the workers count
36-
# should be equal to the number of processors (CPU cores) in production.
37-
#
38-
# Automatically detect the number of available processors in production
39-
# when WEB_CONCURRENCY is set to "auto".
40-
require "concurrent-ruby"
41-
workers_count = if ENV["WEB_CONCURRENCY"] == "auto"
42-
Concurrent.available_processor_count
43-
else
44-
Integer(ENV.fetch("WEB_CONCURRENCY", 1))
45-
end
46-
workers workers_count if workers_count > 1
47-
4835
preload_app!
4936
when "development"
5037
# Specifies a very generous `worker_timeout` so that the worker

0 commit comments

Comments
 (0)