From 59bfd6a029d7d361202efa4e66f7fac1eb32c3a6 Mon Sep 17 00:00:00 2001 From: DeeDeeG Date: Tue, 9 Mar 2021 22:10:49 -0500 Subject: [PATCH] Revert "Enable puma clustered (#654)" (#659) This reverts commit 6c63546e3047bfddcf6d51f06ef51921ba4f15be. We don't know for sure that we need these speed/latency gains, and maintenance bandwidth is low for the project. We don't want to potentially have to track down bugs, or undo any damage done, so revert this change for now. --- config/puma.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/config/puma.rb b/config/puma.rb index bc2dbc37..a5eccf81 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -21,7 +21,14 @@ # Workers do not work on JRuby or Windows (both of which do not support # processes). # -workers ENV.fetch("WEB_CONCURRENCY") { 3 } +# workers ENV.fetch("WEB_CONCURRENCY") { 2 } + +# Use the `preload_app!` method when specifying a `workers` number. +# This directive tells Puma to first boot the application and load code +# before forking the application. This takes advantage of Copy On Write +# process behavior so workers use less memory. +# +# preload_app! # Allow puma to be restarted by `rails restart` command. plugin :tmp_restart