Closed vedant1811 closed 7 years ago
+1 Did you find the solution ?
+1 for me as well. I think it has to do with the sudo service unicorn_xyz_env restart
call.
When I run sudo service unicorn_xyz_env restart
with unicorn running, it simply kills unicorn, resulting in 502s. If I run the same command again, unicorn starts properly. Repeating again, simply kills unicorn, and so on...
I'm wondering if this is an issue with unicorn...?
+1 any solution ?
It happens the same to me, it seems to be have something with the Unicorn init.d script. I think this is the same issue: https://github.com/capistrano-plugins/capistrano-unicorn-nginx/issues/62 Unicorn signals: https://unicorn.bogomips.org/SIGNALS.html
I fixed the problem in my server. See the explanation in the pull-request https://github.com/capistrano-plugins/capistrano-unicorn-nginx/pull/93. Until it gets merged you can use my fork.
This is merged now.
My cap deploy runs fine but I get
(111: Connection refused)
in my nginx logs after my deploy is complete (hence 502 errors). From the output ofcap deploy
I can see that both nginx and unicorn have been restarted.I have to run a
cap unicorn:restart
explicitly aftercap deploy
to fix this.my
Capfile
:my
deploy.rb
: