about summary refs log tree commit diff
path: root/config/puma.rb
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2023-01-10 17:10:11 +0100
committerGitHub <noreply@github.com>2023-01-10 17:10:11 +0100
commit932a22219ae99a285bdd0b69f02627f029327db3 (patch)
tree5c211e2d230afa698ed4cc081c076251817b0d8d /config/puma.rb
parentad17e1944aa4c01c5637199b464c9d78b7e54af2 (diff)
parenta7bf439cfd12ec44c5da9d51e501e51fdfc12b54 (diff)
Merge pull request #2077 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'config/puma.rb')
-rw-r--r--config/puma.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/config/puma.rb b/config/puma.rb
index 224be7903..e59295445 100644
--- a/config/puma.rb
+++ b/config/puma.rb
@@ -1,7 +1,8 @@
 persistent_timeout ENV.fetch('PERSISTENT_TIMEOUT') { 20 }.to_i
 
-threads_count = ENV.fetch('MAX_THREADS') { 5 }.to_i
-threads threads_count, threads_count
+max_threads_count = ENV.fetch('MAX_THREADS') { 5 }.to_i
+min_threads_count = ENV.fetch('MIN_THREADS') { max_threads_count }.to_i
+threads min_threads_count, max_threads_count
 
 if ENV['SOCKET']
   bind "unix://#{ENV['SOCKET']}"
@@ -10,7 +11,7 @@ else
 end
 
 environment ENV.fetch('RAILS_ENV') { 'development' }
-workers     ENV.fetch('WEB_CONCURRENCY') { 2 }
+workers     ENV.fetch('WEB_CONCURRENCY') { 2 }.to_i
 
 preload_app!