From: Stephen Eley <sfeley@gmail.com>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Subject: Re: synchronous restart
Date: Tue, 31 Aug 2010 16:58:40 -0400 [thread overview]
Message-ID: <AANLkTinc+L2+ivKRvVFXXtOoy2WEjpxSUex+u2imt9wU@mail.gmail.com> (raw)
In-Reply-To: <AANLkTik5v5mCRecaWo0R-4m+ns-=pwJhZJf-XFzUdzGp@mail.gmail.com>
On Tue, Aug 31, 2010 at 3:08 PM, Clifton King <cliftonk@gmail.com> wrote:
>
> http://pastie.org/1129610
>
> Most of that configuration file was from a github blog post about
> unicorn (you can try googling for it).
Cool. In that spirit, here's the config file I use with Vlad the
Deployer in all of my Rails apps:
http://gist.github.com/559710
Four Unicorn-related tasks are included:
* start_unicorn: Calls the unicorn server with the path to the
appropriate config/unicorn.rb file
* reload_unicorn: Sends HUP for a graceful reload (and falls back to
start_unicorn if any status errors come back)
* kick_unicorn: Sends USR2 for synchronous restart. If successful,
sends WINCH to the old process and then QUIT after one minute (to give
time for testing and fallback if necessary).
* rescue_unicorn: Recovers from a failed kick_unicorn if necessary.
Does a HUP to revive the old master and QUITs the new one.
I've been meaning to bundle this into a Vlad plugin gem, but haven't
gotten around to it yet. In the meantime, here it is in case anyone
would find it useful. (I also have Git automation in there that reads
the branch name for the environment. I.e., I have branches for
'staging', 'production', etc. -- and named users and server subdomains
for them, too.)
--
Have Fun,
Steve Eley (sfeley@gmail.com)
ESCAPE POD - The Science Fiction Podcast Magazine
http://www.escapepod.org
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying
prev parent reply other threads:[~2010-08-31 21:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-31 18:30 synchronous restart Jamie Wilkinson
2010-08-31 19:08 ` Clifton King
2010-08-31 20:08 ` Jamie Wilkinson
2010-08-31 20:15 ` Clifton King
2010-08-31 20:29 ` Stephen Eley
2010-08-31 23:59 ` Lawrence Pit
2010-08-31 20:58 ` Stephen Eley [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://yhbt.net/unicorn/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTinc+L2+ivKRvVFXXtOoy2WEjpxSUex+u2imt9wU@mail.gmail.com \
--to=sfeley@gmail.com \
--cc=mongrel-unicorn@rubyforge.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhbt.net/unicorn.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).