From f8f525bf91a728d3ffb41cb0bc81568a5f3b5b50 Mon Sep 17 00:00:00 2001 From: xxq250 Date: Mon, 17 Mar 2025 09:25:52 +0800 Subject: [PATCH] puma config --- config/puma.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/config/puma.rb b/config/puma.rb index e31c00feb..7b1c435c7 100644 --- a/config/puma.rb +++ b/config/puma.rb @@ -4,12 +4,12 @@ # the maximum value specified for Puma. Default is set to 5 threads for minimum # and maximum; this matches the default thread size of Active Record. # -threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } +threads_count = ENV.fetch("RAILS_MAX_THREADS") { 8 } threads threads_count, threads_count # Specifies the `port` that Puma will listen on to receive requests; default is 3000. # -port ENV.fetch("PORT") { 3000 } +port ENV.fetch("PORT") { 4000 } # Specifies the `environment` that Puma will run in. # @@ -21,7 +21,8 @@ environment ENV.fetch("RAILS_ENV") { "development" } # Workers do not work on JRuby or Windows (both of which do not support # processes). # -# workers ENV.fetch("WEB_CONCURRENCY") { 2 } + +workers ENV.fetch("WEB_CONCURRENCY") { 8 } # Use the `preload_app!` method when specifying a `workers` number. # This directive tells Puma to first boot the application and load code