Add puma worker killer config into puma config file when you start puma as a daemon. If you add it into initialize file , it could be problem.
Sample like this: (in puma.rb file)
before_fork do
ActiveRecord::Base.connection_pool.disconnect!
PumaWorkerKiller.config do |config|
config.ram = 2 * 1024 # mb
config.frequency = 10 # seconds
config.percent_usage = 0.95
config.rolling_restart_frequency = 12 * 3600 # 12 hours in seconds
end
PumaWorkerKiller.start
end
Add puma worker killer config into puma config file when you start puma as a daemon. If you add it into initialize file , it could be problem. Sample like this: (in puma.rb file) before_fork do ActiveRecord::Base.connection_pool.disconnect!
PumaWorkerKiller.config do |config| config.ram = 2 * 1024 # mb config.frequency = 10 # seconds config.percent_usage = 0.95 config.rolling_restart_frequency = 12 * 3600 # 12 hours in seconds end PumaWorkerKiller.start end