Skip to content

Commit

Permalink
Merge pull request #1317 from dmitry-sinina/fix_puma_config
Browse files Browse the repository at this point in the history
fix puma restart delay
  • Loading branch information
dmitry-sinina authored Jul 18, 2023
2 parents 17876de + aed70ba commit 0e93b46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 1 addition & 3 deletions config/puma_conteinerized.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down
6 changes: 2 additions & 4 deletions config/puma_production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand All @@ -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:
Expand Down

0 comments on commit 0e93b46

Please sign in to comment.