Using God to monitor Unicorn - Start exited with non-zero code = 1

后端 未结 3 1587
孤街浪徒
孤街浪徒 2020-12-14 05:42

I am working on a God script to monitor my Unicorns. I started with GitHub\'s examples script and have been modifying it to match my server configuration. Once God is runn

3条回答
  •  温柔的废话
    2020-12-14 06:29

    Add the log option has helped me greatly in debugging.

    God.watch do |w|
      w.log = "#{RAILS_ROOT}/log/god.log"
    
      # remainder of config
    end
    

    In the end, my bug turned out to be the start_script in God was executed in development environment. I fixed this by appending the RAILS_ENV to the start script.

    start_script = "RAILS_ENV=#{ENV['RACK_ENV']} bundle exec sidekiq -P #{pid_file} -C #{config_file} -L #{log_file} -d"
    

提交回复
热议问题