exit status 0 on puma start using monit
nikhilbhatt opened this issue · comments
I am facing error (exit status 0) in latest versions of puma-daemon
gem.
0.1.2 works fine without any error with puma 6.4 version. but later version of puma-daemon throws error.
rails version - 6.1.4
ruby - 2.7.2
puma - 6.4
puma-daemon - > 0.1.2
Steps to reproduce
- Update the gem versions to > 0.1.2
- start puma
- Error log
'puma' failed to start (exit status 0) -- '/bin/bash -l -c bin/pumactl start -F /path_to_puma_config.rb>
[673353] * Puma version: 6.4.0 (ruby 2.7.5-p203) ("The Eagle of Durango")
[673353] * Min threads: 1
[673353] * Max threads: 1
[673353] * Environment: env
[673353] * Master PID: 12345
[673353] * Puma Dae
I am using monit to start the puma process.
Could you please share the relevant parts of the puma's configuration?
#!/usr/bin/env puma
directory 'app_base_dir'
rackup 'path_to_config.ru'
environment 'current_environment'
daemonize
pidfile 'path_of_puma.pid'
state_path 'path_of_puma.state'
threads Integer(ENV['MIN_THREADS']), Integer(ENV['MAX_THREADS'])
Thread.abort_on_exception = true
bind 'unix://socket_path'
workers Integer(ENV['WEB_CONCURRENCY'])
preload_app!
tag 'app_name'
worker_timeout 20
activate_control_app 'path_to_pumactl.sock'
This is the minimal configurations set to puma.rb
Configurations were same for both the versions. I just updated out gem to newer version and it stopped working.
Note:- we are now no longer using puma-daemon gem. as suggested by puma docs we have separated out the logic of daemonization from application.
Will investigate
Could you move the daemonize to the end of the config file and retest?