Skip to content

Commit

Permalink
Restart workers at 75% RAM usage instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Dantemss committed Jan 20, 2021
1 parent d9ecc4b commit 8169925
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/puma.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
require 'puma_worker_killer'

PumaWorkerKiller.config do |config|
# Restart workers when they start consuming more than 1G each
# Restart workers when they start consuming too much of the RAM
config.ram = ENV.fetch('MAX_MEMORY') do
ENV.fetch('MAX_WORKER_MEMORY', 1024).to_i * NUM_WORKERS
end.to_i

config.frequency = 10

config.percent_usage = 0.8
config.percent_usage = 0.75

config.rolling_restart_frequency = false

Expand Down

0 comments on commit 8169925

Please sign in to comment.