cliftonk at gmail.com
Tue Aug 31 15:08:39 EDT 2010
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
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,
On Tue, Aug 31, 2010 at 1:30 PM, Jamie Wilkinson <jamie at tramchase.com> 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,
> Unicorn mailing list - mongrel-unicorn at rubyforge.org
> Do not quote signatures (like this one) or top post when replying
More information about the mongrel-unicorn