From e9d5895d67d4ba1bb839bad0ac38534a49b44363 Mon Sep 17 00:00:00 2001 From: Petrik Date: Sun, 5 Jan 2025 16:41:12 +0100 Subject: [PATCH] [rails] Update puma to 6.5 and auto config workers +--------------+---------+------+------+-----+-----+-------+------------+--------------+ | branch_name|plaintext|update| json| db|query|fortune|cached-query|weighted_score| +--------------+---------+------+------+-----+-----+-------+------------+--------------+ | master| 24599| 10016| 84462|24975|15127| 15241| 16647| 1207| |rails/puma-6.5| 20084| 10768| 74156|27255|17746| 18156| 17960| 1320| +--------------+---------+------+------+-----+-----+-------+------------+--------------+ --- frameworks/Ruby/rails/config/puma.rb | 3 --- frameworks/Ruby/rails/rails-mysql.dockerfile | 1 + frameworks/Ruby/rails/rails.dockerfile | 1 + 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/frameworks/Ruby/rails/config/puma.rb b/frameworks/Ruby/rails/config/puma.rb index b513db258e6..7a8e1da62e5 100644 --- a/frameworks/Ruby/rails/config/puma.rb +++ b/frameworks/Ruby/rails/config/puma.rb @@ -30,9 +30,6 @@ # Specifies the `port` that Puma will listen on to receive requests; default is 3000. port ENV.fetch("PORT", 3000) -tuned_num_workers, tuned_num_threads = auto_tune -workers tuned_num_workers - # Allow puma to be restarted by `bin/rails restart` command. plugin :tmp_restart diff --git a/frameworks/Ruby/rails/rails-mysql.dockerfile b/frameworks/Ruby/rails/rails-mysql.dockerfile index 9e7083a1f4d..8ffbccc1b49 100644 --- a/frameworks/Ruby/rails/rails-mysql.dockerfile +++ b/frameworks/Ruby/rails/rails-mysql.dockerfile @@ -20,6 +20,7 @@ RUN bundle install --jobs=8 COPY . /rails/ +ENV WEB_CONCURRENCY=auto ENV RAILS_ENV=production_mysql ENV PORT=8080 ENV REDIS_URL=redis://localhost:6379/0 diff --git a/frameworks/Ruby/rails/rails.dockerfile b/frameworks/Ruby/rails/rails.dockerfile index 451a4e5bfac..f35d50b8e0e 100644 --- a/frameworks/Ruby/rails/rails.dockerfile +++ b/frameworks/Ruby/rails/rails.dockerfile @@ -20,6 +20,7 @@ RUN bundle install --jobs=8 COPY . /rails/ +ENV WEB_CONCURRENCY=auto ENV RAILS_ENV=production_postgresql ENV PORT=8080 ENV REDIS_URL=redis://localhost:6379/0