From aed70ba09b9f99760ec76fbcfa2f852006389b27 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Tue, 18 Jul 2023 23:18:18 +0300 Subject: [PATCH] fix puma restart delay --- config/puma_conteinerized.rb | 4 +--- config/puma_production.rb | 6 ++---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/config/puma_conteinerized.rb b/config/puma_conteinerized.rb index 428822cb5..a368b885e 100644 --- a/config/puma_conteinerized.rb +++ b/config/puma_conteinerized.rb @@ -15,12 +15,10 @@ state_path '/run/yeti/yeti-web-puma.state' -# stdout_redirect '/opt/yeti-web/log/puma.stdout.log', '/opt/yeti-web/log/puma.stderr.log', true - preload_app! # Set the timeout for worker shutdown -worker_shutdown_timeout(120) +worker_shutdown_timeout(10) # Set Timestamp log_formatter do |str| diff --git a/config/puma_production.rb b/config/puma_production.rb index 76891a5e9..8a1044c19 100644 --- a/config/puma_production.rb +++ b/config/puma_production.rb @@ -11,12 +11,10 @@ state_path '/run/yeti/yeti-web-puma.state' -stdout_redirect '/opt/yeti-web/log/puma.stdout.log', '/opt/yeti-web/log/puma.stderr.log', true - preload_app! # Set the timeout for worker shutdown -worker_shutdown_timeout(120) +worker_shutdown_timeout(10) # Set Timestamp log_formatter do |str| @@ -33,7 +31,7 @@ PumaWorkerKiller.config do |config| config.ram = 2048 # mb - config.frequency = 5 # seconds + config.frequency = 120 # seconds config.percent_usage = 0.98 config.rolling_restart_frequency = 3 * 3600 # 12 hours in seconds, or 12.hours if using Rails config.reaper_status_logs = true # setting this to false will not log lines like: