20 May 2013 18:46
Unicorn + RUnit Rails Not Killing Old Master
Graham Christensen <graham <at> grahamc.com>
2013-05-20 16:46:08 GMT
2013-05-20 16:46:08 GMT
Hi, I'm deploying Unicorn on a Rails application with RUnit. Technically I'm using Chef's deployment tools, if any of you are familiar with it (https://github.com/opscode-cookbooks/application_ruby) but to be clear they aren't doing anything magical, so this is purely an issue with RUnit and Unicorn. The TL;DR of the following post, which has lots of pastes (linking to pastebins for easier reading:) when I run /etc/init.d/myzippykid restart, the old unicorn master fails to die, causing the new master to be stuck in a loop waiting to own port 8080. The new master never takes over, as the old master never dies. When I manually kill the master, the new one takes over just fine. What am I missing in my restart process to make the old master exit? -- More details: When I deploy a new version of software, the unicorn master fails to restart. Here is an example of my ps auxfg output after I run `/etc/init.d/myzippykid restart` (which is symlinked to /usr/bin/sv): https://gist.github.com/grahamc/35715c1a2c9717e461e3 When I run `killall unicorn`, the ruby script under runsvdir gets replaced with the unicorn worker. This is because the ruby script is attempting to bind to port 8080, which is already taken up by the unicorn master process. As soon as the old master is out of the way,(Continue reading)
RSS Feed