pierrecode
pierrecode

Reputation: 222

How to force Puma start in single mode on Rails?

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

Upvotes: 10

Views: 7457

Answers (1)

Rafayet Monon
Rafayet Monon

Reputation: 1179

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.

Upvotes: 33

Related Questions