Puma Worker Killer の ram の設定 をどうすれば良いのか分かりません。
下記が該当のURLです。
- [https://github.com/schneems/puma_worker_killer#configure
](https://github.com/schneems/puma_worker_killer#configure)
- [https://github.com/schneems/puma_worker_killer#attention
](https://github.com/schneems/puma_worker_killer#attention)
ruby
1before_fork do 2 PumaWorkerKiller.config do |config| 3 config.ram = 1024 # mb 4 config.frequency = 5 # seconds 5 config.percent_usage = 0.98 6 config.rolling_restart_frequency = 12 * 3600 # 12 hours in seconds, or 12.hours if using Rails 7 end 8 PumaWorkerKiller.start 9end
↑の config.ram は以下の説明があります。
It is important that you tell your code how much RAM is available on your system. The default is 512 mb (the same size as a Heroku 1x dyno). You can change this value like this:
PumaWorkerKiller.ram = 1024 # mb
サーバーのメモリが以下であれば、
$ free -m total used free shared buff/cache available Mem: 3945 1122 2341 0 480 2549 Swap: 0 0 0
そのままの 3945 を書けばよいということですか?
PumaWorkerKiller.ram = 3945 # mb
あなたの回答
tips
プレビュー