#######知りたいこと
puma_worker_killerをデーモンで起動した場合にログが出力されるファイルまたは場所が知りたいです。
#######現状やったこと
デーモンで起動しない場合は、ターミナル上に以下のようなログが出力されることまでは確認しました。
PumaWorkerKiller: Consuming 54.34765625 mb with master and 2 workers.
またデーモン起動時にworker数が複数になっていることも確認しています。
➜ アプリ名 git:(master) ✗ bundle exec puma [5371] Puma starting in cluster mode... [5371] * Version 3.6.2 (ruby 2.3.1-p112), codename: Sleepy Sunday Serenity [5371] * Min threads: 5, max threads: 5 [5371] * Environment: production [5371] * Process workers: 2 [5371] * Preloading application [5371] * Listening on unix:///var/www/rails/アプリ名/tmp/sockets/puma.sock [5371] * Listening on tcp://0.0.0.0:3000 [5371] * Daemonizing...
#######環境
Rails 5.0.0.1 puma version 3.6.2 nginx/1.10.1
#######ログの確認をしたファイル
・var/log/nginx/access.log ・/var/www/rails/アプリ名/log/nginx.access.log ・/var/www/rails/アプリ名/log/production.log
#######puma.rbの設定
app_root = File.expand_path("../..",__FILE__) bind "unix://#{app_root}/tmp/sockets/puma.sock" pidfile "#{app_root}/tmp/pids/puma.pid" state_path "#{app_root}/tmp/pids/puma.state" threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i threads threads_count, threads_count port ENV.fetch("PORT") { 3000 } environment ENV.fetch("RAILS_ENV") { "production" } workers ENV.fetch("WEB_CONCURRENCY") { 2 } preload_app! on_worker_boot do ActiveRecord::Base.establish_connection if defined?(ActiveRecord) end plugin :tmp_restart # puma_worker_killerの設定 before_fork do PumaWorkerKiller.config do |config| config.ram = 1024 # mb config.frequency = 30 # seconds config.percent_usage = 0.65 config.rolling_restart_frequency = 12 * 3600 # 12 hours in seconds, or 12.hours if using Rails config.reaper_status_logs = true end PumaWorkerKiller.start ActiveRecord::Base.connection_pool.disconnect! if defined?(ActiveRecord) end daemonize true
#######puma_worker_killerのログはどこに?
ログの出力場所がわかる方がいれば教えて頂けると幸いです。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。