I m working on a Ruby app. My versions always started locally with Puma in single mode. For one week, Puma has automatically launched in cluster mode, it generates bugs, broadcasts don't launch anymore ... How can I force Puma to start in single mode ? I can't see such control on my config/puma.rb
Asked
Active
Viewed 5,132 times
8
-
What does your puma.rb look like? – ellitt Apr 06 '20 at 15:47
-
`max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 1 } min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { 1 } threads min_threads_count, max_threads_count port ENV.fetch("PORT") { 3000 } rackup DefaultRackup environment ENV.fetch("RAILS_ENV") { "development" } pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" } workers ENV.fetch("WEB_CONCURRENCY") { 2 } preload_app! plugin :tmp_restart` – pierrecode Apr 06 '20 at 18:48
1 Answers
22
Find this line in config/puma.rb
. It's usually commented.
# workers ENV.fetch("WEB_CONCURRENCY") { 2 }
If it's uncommented then just comment it or make it like below
workers ENV.fetch("WEB_CONCURRENCY") { 0 }
Then puma will start in single mode.

Rafayet Monon
- 1,019
- 8
- 16
-
1thank you, I made your changes and now it's working :)) I clicked the useful arrow, but they say my reputation is too low to increase yours :/ wish I could help too – pierrecode Apr 06 '20 at 19:03