Unicorn unable to summon workers to USR2 signal

I send a USR2 signal to the master process to achieve zero downtime with the unicorn. After the old master is dead, I get the following error:

adding listener failed addr=/path/to/unix_socket (in use) unicorn-4.3.1/lib/unicorn/socket_helper.rb:140:in `initialize': Address already in use - /path/to/unix_socket (Errno::EADDRINUSE) 

The old master is killed in the before_fork block in the before_fork configuration file. The process is started using an upstart without the daemon option (-D). Any idea what is going on?

+6
source share
1 answer

Well, it turns out you need to run in demonized mode (-D) if you want to be able to perform zero deployment of inaction. I changed a few things in my upstart script, and now it works fine:

 setuid username pre-start exec unicorn_rails -E production -c /path/to/app/config/unicorn.rb -D post-stop exec kill cat `/path/to/app/tmp/pids/unicorn.pid` respawn 
+2
source

All Articles