Skip to content

Commit

Permalink
Fix Workers Count: Set default count of 2 (#2545)
Browse files Browse the repository at this point in the history
  • Loading branch information
pglombardo committed Sep 23, 2024
1 parent 4f5f9d2 commit 76d8f88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/puma.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

case rails_env
when "production"
require "concurrent-ruby"
workers_count = Integer(ENV.fetch("WEB_CONCURRENCY") { Concurrent.available_processor_count })
# Default to 2 workers. To override, set the WEB_CONCURRENCY environment variable
workers_count = Integer(ENV.fetch("WEB_CONCURRENCY") { 2 })
workers workers_count if workers_count > 1

preload_app!
Expand Down

0 comments on commit 76d8f88

Please sign in to comment.