3
從薄到獨角獸。 Unicorn在我的開發機器(Mac OSX)上運行良好,但在Heroku上出現以下消息(不同的PID,0到2之間的不同工號)reaped #<Process::Status: pid 564 exit 1> worker=0
。日誌中沒有其他消息指出問題所在。此消息表明什麼以及如何對其進行故障排除?獨角獸在Heroku上持續收割
Procfile:
web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb
Unicorn.rb:
worker_processes Integer(ENV["WEB_CONCURRENCY"] || 3)
timeout 15
preload_app true
before_fork do |server, worker|
Signal.trap 'TERM' do
puts 'Unicorn master intercepting TERM and sending myself QUIT instead'
Process.kill 'QUIT', Process.pid
end
defined?(ActiveRecord::Base) and
ActiveRecord::Base.connection.disconnect!
end
after_fork do |server, worker|
Signal.trap 'TERM' do
puts 'Unicorn worker intercepting TERM and doing nothing. Wait for master to sent QUIT'
end
defined?(ActiveRecord::Base) and
ActiveRecord::Base.establish_connection
end
我打了同樣的問題..沒有你找到解決方案?下面的污點建議並不適用於我。 –
什麼似乎解決了它(我正在嘗試很多事情)正在評論「preload_app true」行。讓我知道它是否適用於您,我會將其作爲正式答案。 –