Jamie, Here is a sample unicorn config file that automatically sends the old master process a QUIT signal if the new master process successfully boots and starts forking (which is what I assume you are asking about). We get 0 downtime deploys using this method (and changes typically propagate live in 5-10 seconds). If the new master process fails at booting, you can tail the unicorn.stdout/err.log files to see why.
http://pastie.org/1129610 Most of that configuration file was from a github blog post about unicorn (you can try googling for it). I also added a section that writes out PID files for workers so you can monitor their memory usage (and send them quit signals when they exceed the limit). We do that via god. Hope that helps, Clifton On Tue, Aug 31, 2010 at 1:30 PM, Jamie Wilkinson <[email protected]> wrote: > Has anyone tried to synchronously restart their unicorns, to ensure that > things restart OK? > > I imagine I could write a script that sent USR2 and then watched the log for > a successful before exiting, but I dream there is something more MAGICAL > > > Yours in mythical web servers, > > -jamie > > _______________________________________________ > Unicorn mailing list - [email protected] > http://rubyforge.org/mailman/listinfo/mongrel-unicorn > Do not quote signatures (like this one) or top post when replying > _______________________________________________ Unicorn mailing list - [email protected] http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like this one) or top post when replying
