James Cox <[email protected]> wrote: > On Tue, Aug 2, 2011 at 17:53, Eric Wong <[email protected]> wrote: > > James Cox <[email protected]> wrote: > >> Hey, > >> > >> So here are some tasks for managing unicorn: > >> > >> https://gist.github.com/1121076 > > > > Can we ignore the :restart task? It's a bit fragile since it doesn't > > wait for the old process to die (SIGTERM means > > kill-as-quickly-as-possible, but given a loaded system it can still take > > some time). > > We mostly restart (what surprise). What pattern works best here for > that? (speed of deploy is important, but definitely assume a long boot > time)
Yeah, if you do a full shutdown, I would definitely wait a little for the old process to shut down (wait for pid to disappear), first. However, full shutdown means you drop connections, so I would use USR2 followed by QUIT (on same pid, USR2 will replace the current pid file). See http://unicorn.bogomips.org/SIGNALS.html > So what should that look like? all but that nr-workers stuff? can i > just remove the before fork? and what would you say is a super good > unicorn config to start from? Yeah, skip the before_fork and also after_fork. Those are mainly for disconnect/reconnect of ActiveRecord and anything else that might need a network connection. I try to have as little-as-possible in my unicorn config. -- Eric Wong _______________________________________________ Unicorn mailing list - [email protected] http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like this one) or top post when replying
