为什么puma登台环境无法启动?

时间:2016-01-28 10:01:20

标签: ruby-on-rails puma

当我尝试在staging环境中启动我的Web服务器时,它无法运行。 但是在production环境中配置相同 - 一切正常。

哪里可以出错?

我对美洲狮的配置是:

deploy_to = ENV['CURRENT_PATH']

workers Integer(ENV['PUMA_WORKERS'] || 3)
threads Integer(ENV['MIN_THREADS']  || 16), Integer(ENV['MAX_THREADS'] || 16)
daemonize       true
preload_app!
backlog = Integer(ENV['PUMA_BACKLOG'] || 20)

directory       "#{deploy_to}/current"
pidfile         "#{deploy_to}/shared/tmp/pids/puma.pid"
state_path      "#{deploy_to}/shared/tmp/sockets/puma.state"
stdout_redirect "#{deploy_to}/shared/log/puma.stdout.log", "#{deploy_to}/shared/log/puma.stderr.log"
bind            "unix://#{deploy_to}/shared/tmp/sockets/kiosk.sock"
activate_control_app "unix://#{deploy_to}/shared/tmp/sockets/pumactl.sock"


on_worker_boot do
  # worker specific setup
  ActiveSupport.on_load(:active_record) do
    config = ActiveRecord::Base.configurations[Rails.env] ||
                Rails.application.config.database_configuration[Rails.env]
    config['pool'] = ENV['MAX_THREADS'] || 16
    ActiveRecord::Base.establish_connection(config)
  end
end

UPD

puma.stdout.log

=== puma startup: 2016-01-28 09:54:11 +0000 === 
[14731] * Starting control server on unix:///home/ubuntu/staging/shared/tmp/sockets/pumactl.sock 
[14731] - Worker 0 (pid: 14794) booted, phase: 0 
[14731] - Worker 1 (pid: 14814) booted, phase: 0 
[14731] - Worker 2 (pid: 14829) booted, phase: 0 
[14731] - Gracefully shutting down workers... 
[14731] === puma shutdown: 2016-01-28 09:55:17 +0000 === 
[14731] - Goodbye!

0 个答案:

没有答案