Closed krim closed 3 years ago
This is not working. The deployment will never finish .
Did you try it ?
@seuros, of course, I tried it. My puma.rb:
#!/usr/bin/env puma
directory '/home/back/current'
rackup "/home/back/current/config.ru"
environment 'production'
pidfile "/home/back/shared/tmp/pids/puma.pid"
state_path "/home/back/shared/tmp/pids/puma.state"
stdout_redirect '/home/back/current/log/puma.error.log', '/home/back/current/log/puma.access.log', true
threads 4,8
bind 'unix:///home/back/shared/tmp/sockets/puma.sock'
workers 0
preload_app!
before_fork do
ActiveRecord::Base.connection_pool.disconnect!
end
on_worker_boot do
ActiveSupport.on_load(:active_record) do
ActiveRecord::Base.establish_connection
end
end
I use systemd
as recommended here: https://github.com/puma/puma/blob/master/5.0-Upgrade.md#upgrade
So, I missed removing the--daemon
flag.
Now I tried to use start/restart/reload and everything works fine.
@krim When configured without puma daemonization, does the puma.rb generated by capistrano-puma work still, or does it require a custom one? Are you using the standard systemd unit file as defined here, or a custom one? If a custom one is being used, can you share it and/or add documentation for it?
Just tried this on our staging server and the --daemon option was still there in the monit config. sadly it didn't boot at all even when I manually removed it.
Fix https://github.com/seuros/capistrano-puma/issues/297 Upgrade guide: https://github.com/puma/puma/blob/master/5.0-Upgrade.md