aws / opsworks-cookbooks

Chef Cookbooks for the AWS OpsWorks Service
Other
1.05k stars 1.23k forks source link

Unicorn master process not receiving QUIT #400

Closed apanzerj closed 7 years ago

apanzerj commented 7 years ago

So when preload_app = true (which it does by default) the method for restart is to send USR2 and then QUIT.

The way that this is accomplished is by using the unicorn conf / before_fork block that sends the QUIT signal to the pid in the old_pid file.

It seems like this isn't really happening because:

  1. The original process running (as master) if you lsof -p (pid) you find it is referencing the old path, not the new path of the deploy. Lsof output below:

image

  1. Oddly, the old_pid file does get renamed to unicorn.pid despite the restart not succeeding.

  2. In the after_restart.rb you can see, if you ls the pids dir, you see it's got old_pid, which means the QUIT signal hasn't been sent and the fork hasn't actually happened.

Thoughts? Help?

apanzerj commented 7 years ago

bump any help would be really appreciated.

dignoe commented 7 years ago

I'm also having problems with my deploys not picking up the new code. If I deploy some minor changes (no gemfile or migrations), the unicorn workers do not pick up the changes. They are still looking at the old release!

apanzerj commented 7 years ago

moved on, closing issue....