From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS14383 205.234.109.0/24 X-Spam-Status: No, score=-0.5 required=5.0 tests=AWL,MSGID_FROM_MTA_HEADER, RP_MATCHES_RCVD shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: Eric Wong Newsgroups: gmane.comp.lang.ruby.unicorn.general Subject: Re: Unicorn 0.97.0 old master is never dying Date: Fri, 19 Mar 2010 01:23:35 -0700 Message-ID: <20100319082335.GA3191@dcvr.yhbt.net> References: <151643b21003170251g3cabd79bq36c9af668db574e0@mail.gmail.com> <20100318084022.GA11167@dcvr.yhbt.net> <151643b21003180935h159eb627v725797a42083d1ca@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1268987026 2794 80.91.229.12 (19 Mar 2010 08:23:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 19 Mar 2010 08:23:46 +0000 (UTC) Cc: unicorn list To: ghazel@gmail.com Original-X-From: mongrel-unicorn-bounces@rubyforge.org Fri Mar 19 09:23:41 2010 Return-path: Envelope-to: gclrug-mongrel-unicorn@m.gmane.org X-Original-To: mongrel-unicorn@rubyforge.org Delivered-To: mongrel-unicorn@rubyforge.org Content-Disposition: inline In-Reply-To: <151643b21003180935h159eb627v725797a42083d1ca@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-BeenThere: mongrel-unicorn@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: mongrel-unicorn-bounces@rubyforge.org Errors-To: mongrel-unicorn-bounces@rubyforge.org Xref: news.gmane.org gmane.comp.lang.ruby.unicorn.general:449 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NsXUa-0004jJ-BB for gclrug-mongrel-unicorn@m.gmane.org; Fri, 19 Mar 2010 09:23:40 +0100 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id B7F4C18582E7; Fri, 19 Mar 2010 04:23:39 -0400 (EDT) Received: from dcvr.yhbt.net (dcvr.yhbt.net [64.71.152.64]) by rubyforge.org (Postfix) with ESMTP id ED7FB18582D0 for ; Fri, 19 Mar 2010 04:23:36 -0400 (EDT) Received: from localhost (unknown [127.0.2.5]) by dcvr.yhbt.net (Postfix) with ESMTP id 410EC1F43D; Fri, 19 Mar 2010 08:23:36 +0000 (UTC) ghazel@gmail.com wrote: > On Thu, Mar 18, 2010 at 1:40 AM, Eric Wong wrote: > > ghazel@gmail.com wrote: > >> I upgraded to Unicorn 0.97.0 from 0.96.1. Unicorn starts fine, but > >> sending a USR2 to the 0.97.0 master launches a new master and all the > >> workers, but never kills the old master. The new workers retry binding > >> their admin TCP ports forever. Killing all the Unicorns and > >> downgrading to returns peace to the forest. > >> > >> Here are the before_fork and after_fork from my config/unicorn.rb: > >> http://codepad.org/5LyVtyq7 > >> > >> Did something change with the Unicorn master in 0.97.0 that would > >> require a change in my config, or is this a bug? > >> > >> -Greg > > > > Hi Greg, > > > > Odd, are you passing the pid file path via the command-line? > > > > I don't see the pid directive in the config file you posted there, so > > there was nothing to check with File.exists?. =A0Are you using `unicorn' > > or `unicorn_rails'? > > > > There were some startup changes in 0.97.0, but I couldn't reproduce what > > you're seeing with 'pid'. =A0That said, I'm not sure if that method of > > killing old masters in the after_fork is very common. > > > > -- > > Eric Wong > > > = > Eric, > = > I am using "unicorn_rails -D -E $ENV -c config/unicorn.rb". Here is > the entire config file: http://codepad.org/v6lUsuzD Ugh. I can't even get to that file right now. I actually prefer to have config files inline so: a) I can comment easily on them b) I don't have to be online when reading them (I sync my mail to a local machine and lose connectivity often) On a side note, maybe an strace/truss can help figure out what's going on. James seems to be having a similar problem in the other thread... > What is the preferred way to do an nginx-style restart? My system does > not really have the memory to start twice the number of workers. If you're doing it during low traffic periods, I would SIGTTOU away most (maybe all but one) of your workers and then SIGHUP the master -- = Eric Wong _______________________________________________ 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