puma ignoring my configuration file

632 views Asked by At

I'm trying to start puma with 2 workers, but when it starts the logs say:

Puma 2.11.3 starting...
* Min threads: 0, max threads: 16
* Environment: production
* Listening on tcp://0.0.0.0:3000

config/puma.rb:

workers Integer(ENV['PUMA_WORKERS'] || 2)
threads Integer(ENV['PUMA_MIN_THREADS']  || 1), Integer(ENV['PUMA_MAX_THREADS'] || 6)

Any idea why puma is launched with 0 min thread rather than 1?

1

There are 1 answers

0
Tal On BEST ANSWER

this is one of those RTFM questions. The puma documentation states:

when using the RACK_ENV environment variable, the default file location will be config/puma/environment_name.rb.

so the fix is to relocate config/puma.rb into config/puma/production.rb