Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Bump puma version to 5.x #298

Closed
wants to merge 2 commits into from
Closed

Conversation

krim
Copy link

@krim krim commented Sep 26, 2020

@krim krim mentioned this pull request Sep 26, 2020
@seuros
Copy link
Owner

seuros commented Sep 26, 2020

This is not working. The deployment will never finish .

Did you try it ?

@krim
Copy link
Author

krim commented Sep 26, 2020

@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.

@danarnold
Copy link

@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?

@braindeaf
Copy link

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.

@seuros seuros closed this in 5e3b949 Nov 2, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for Puma 5.0
4 participants