mirror of https://github.com/rails/rails
471ab2347f
Since Puma 5.0 (puma/puma@05936689c8), Puma will automatically set `workers` to `ENV["WEB_CONCURRENCY"] || 0`. Additionally, if `ENV["WEB_CONCURRENCY"]` > 1, Puma will automatically set `preload_app`. This can lead to confusing scenarios for users who are unaware of this behavior and have customized `config/puma.rb`. For example, if a user uncomments the `workers` and `preload_app!` directives, it is clear that Puma will preload the app, and the number of workers can be configured by setting `ENV["WEB_CONCURRENCY"]`. If the user sets `ENV["WEB_CONCURRENCY"]` > 1, but then changes their mind and removes the `workers` or `preload_app!` directives *without* clearing `ENV["WEB_CONCURRENCY"]`, Puma will still preload the app and launch `ENV["WEB_CONCURRENCY"]` number of workers. Similarly, if a user uncomments *only* the `workers` directive and sets `ENV["WEB_CONCURRENCY"]` > 1, Puma will preload the app even though the `preload_app!` directive is still commented out. To avoid such scenarios, this commit removes the commented-out `workers` and `preload_app!` directives from the default `config/puma.rb`. Also, to improve discoverability of available configuration options, this commit adds a link to the Puma DSL documentation at the top of the file. |
||
---|---|---|
.. | ||
dummy | ||
fixtures | ||
integration | ||
system | ||
template | ||
unit | ||
application_system_test_case.rb | ||
test_helper.rb |