从Thin迁移到Unicorn。在我的开发机(Mac OSX)上,Unicorn运行良好,但在Heroku上失败,不断出现以下消息(不同的PID,0到2之间的不同工作进程号)reaped #<Process::Status: pid 564 exit 1> worker=0
。日志中没有其他消息指示问题所在。这条消息表示什么,我该如何解决问题?
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