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.6 required=5.0 tests=FREEMAIL_FROM, MSGID_FROM_MTA_HEADER,RP_MATCHES_RCVD,T_DKIM_INVALID shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: Lawrence Pit Newsgroups: gmane.comp.lang.ruby.unicorn.general Subject: Re: Unicorn fails to restart gracefully on capistrano deploy Date: Fri, 10 Sep 2010 11:16:10 +1000 Message-ID: <4C8986DA.7090603@gmail.com> References: <162ABE91-E653-45BE-B611-AF6C2B37CC4B@efficiency20.com> <94DA7535-598C-4C42-8D81-91D5A98183EF@tramchase.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1284081387 9340 80.91.229.12 (10 Sep 2010 01:16:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 10 Sep 2010 01:16:27 +0000 (UTC) Cc: Jamie Wilkinson To: unicorn list Original-X-From: mongrel-unicorn-bounces@rubyforge.org Fri Sep 10 03:16:25 2010 Return-path: Envelope-to: gclrug-mongrel-unicorn@m.gmane.org X-Original-To: mongrel-unicorn@rubyforge.org Delivered-To: mongrel-unicorn@rubyforge.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=EfUBHbykn5bJQui4TcKmy66D+nGQ07T4f+m6RLR2XEk=; b=vcTZmXZ5J6cFsdPPYSLW44jqBobUxnxV6XoQiUGM8yauiw9Yq+mOFMsYQZyAeO2CqY EQRchFfc7jlKW6785U5CYF+u7mWByQ11tCbDmLd6rQRsM871zhxLGiv04mLNPWo+7gk7 bsM7ifZELm8+wbASmCbtJRapH82VSFULCd4zA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=m9EBMJC5GLBU8b/OPocZytCYeS6L8OPpdZv3nZ44lj4FlsgH55v6UE4z8wzLzbxSk2 L4HrAOzJclK63dmgzi1Q/z3qM4rdEkSDFWE3CMW6qNRrbbloYZkumo4AOliumh5RyHB1 U1xF8uDO4Od8Ii8tDgBjO3zuDcAvS8s9k73Us= User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.9) Gecko/20100825 Thunderbird/3.1.3 In-Reply-To: <94DA7535-598C-4C42-8D81-91D5A98183EF@tramchase.com> 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:702 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OtsE4-0007Tf-N6 for gclrug-mongrel-unicorn@m.gmane.org; Fri, 10 Sep 2010 03:16:25 +0200 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id EBE03185836B; Thu, 9 Sep 2010 21:16:23 -0400 (EDT) Received: from mail-pw0-f50.google.com (mail-pw0-f50.google.com [209.85.160.50]) by rubyforge.org (Postfix) with ESMTP id 7B1941858370 for ; Thu, 9 Sep 2010 21:16:16 -0400 (EDT) Received: by pwj7 with SMTP id 7so904399pwj.23 for ; Thu, 09 Sep 2010 18:16:15 -0700 (PDT) Received: by 10.114.131.6 with SMTP id e6mr83202wad.90.1284081375194; Thu, 09 Sep 2010 18:16:15 -0700 (PDT) Received: from copa.local (124-171-50-99.dyn.iinet.net.au [124.171.50.99]) by mx.google.com with ESMTPS id 33sm3362999wad.6.2010.09.09.18.16.12 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 09 Sep 2010 18:16:14 -0700 (PDT) See the before_exec in http://gist.github.com/534668 Cheers, Lawrence > On Sep 9, 2010, at 4:28 PM, Eirik Dentz Sinclair wrote: > >> First off thanks very much for all the hard work on unicorn. Alas, we've encountered an issue where unicorn fails to spawn new workers that have loaded the incoming revision on a capistrano deploy. I'm not entirely sure the issue is due to unicorn as it appears that bundler was responsible for a similar issue in the past: http://github.com/carlhuda/bundler/issues/issue/259/#comment_180830 >> >> But presumably bundler has corrected that issue and any help in sorting out the issue would be greatly appreciated. >> >> [snip] >> >> The deployed versioned directory is 20100830230613 >> The incoming versioned directory is 20100902192111 > I think I may have run into a potentially related bundler+unicorn+capistrano issue just today! > > With bundler+unicorn the shell environment does not really get cleared between USR2 restarts/forkings, which was the cause of the aforementioned GitHub ticket... PATH/RUBYOPT would just get infinitely appended to by bundler, and unicorn is happy to let you do whatever with the environment > > The bug I found today cropped up while upgrading from rails 2.3.8 to rails 2.3.9 -- on deploy the new unicorn master would die with "hey you've already loaded rails 2.3.8!". Weird. > > Some quick debugging showed my BUNDLE_GEMFILE environment variable was referencing a Gemfile from a (very) old capistrano release.... I'm actively debugging it now. I'm also using preload_app=true which might have contributed. > > Eirik, can you confirm any similar "old release" weirdnesses by dumping the ENV in your unicorn.rb's before_exec / before_fork? > > STDERR.puts ENV.inspect > _______________________________________________ > 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 > _______________________________________________ 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