Jamie, Check to see that the new unicorn master process has a different PID than the old one. You could have a script that sleeps for X seconds and checks the PID after the deploy and if it matches the old one alerts you with a tail of the stdout/stderr log files. I personally do "ps aux | grep unicorn" a few times during the process if there are any changes being deployed I'm wary of.
Clifton On Tue, Aug 31, 2010 at 3:08 PM, Jamie Wilkinson <[email protected]> wrote: > On Aug 31, 2010, at 12:08 PM, Clifton King wrote: > >> If the new master process >> fails at booting, you can tail the unicorn.stdout/err.log files to see >> why. > > > I should clarify... the above is exactly what I'm trying to avoid. i.e. how > do you know if your new master failed to boot unless you are actively tailing > the logs? > > It is extremely infrequent that our unicorns fail to start, but when it does > we sometimes don't notice for quite some time. Our unicorns also restart so > quickly that it is not an issue to do the restarts synchronously during > deployment and trade speed for peace of mind > > I will probably just replace our basic `kill -USR2` with a small script that > sends the signal and doesn't exit until the pidfile handover is complete. > I'll be sure to share my results in case anyone else might find this useful. > > > -jamie > > http://jamiedubs.com | http://fffff.at > >> 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 > > _______________________________________________ > 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
