mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Add some docs and modify warning message re: single worker warning. [ci skip]
This commit is contained in:
parent
81d26e91b7
commit
714ce75a1c
2 changed files with 12 additions and 1 deletions
|
@ -477,7 +477,7 @@ module Puma
|
|||
|
||||
log "! WARNING: Detected running cluster mode with 1 worker."
|
||||
log "! Running Puma in cluster mode with a single worker is often a misconfiguration."
|
||||
log "! Consider running Puma in single-mode in order to reduce memory overhead."
|
||||
log "! Consider running Puma in single-mode (workers = 0) in order to reduce memory overhead."
|
||||
log "! Set the `silence_single_worker_warning` option to silence this warning message."
|
||||
end
|
||||
|
||||
|
|
|
@ -484,6 +484,17 @@ module Puma
|
|||
|
||||
# Disable warning message when running in cluster mode with a single worker.
|
||||
#
|
||||
# Cluster mode has some overhead of running an addtional 'control' process
|
||||
# in order to manage the cluster. If only running a single worker it is
|
||||
# likely not worth paying that overhead vs running in single mode with
|
||||
# additional threads instead.
|
||||
#
|
||||
# There are some scenarios where running cluster mode with a single worker
|
||||
# may still be warranted and valid under certain deployment scenarios, see
|
||||
# https://github.com/puma/puma/issues/2534
|
||||
#
|
||||
# Moving from workers = 1 to workers = 0 will save 10-30% of memory use.
|
||||
#
|
||||
# @note Cluster mode only.
|
||||
def silence_single_worker_warning
|
||||
@options[:silence_single_worker_warning] = true
|
||||
|
|
Loading…
Add table
Reference in a new issue