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=AWL,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: Justin Giancola Newsgroups: gmane.comp.lang.ruby.unicorn.general Subject: Re: completely stumped by problem encountered replacing running unicorn Date: Thu, 14 Oct 2010 19:01:03 -0400 Message-ID: References: <4CB69A25.3000000@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 1287097901 23158 80.91.229.12 (14 Oct 2010 23:11:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 14 Oct 2010 23:11:41 +0000 (UTC) To: unicorn list Original-X-From: mongrel-unicorn-bounces@rubyforge.org Fri Oct 15 01:11:40 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:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=OePx2eDwZH895OEq+qafgILfoo6u1oZTbbBuYKtGIwU=; b=km+1hAEvEbi+cSblnSz3KFNxd90wF+3dtthaeoETPBizm122kz1D0tISgHq/nj/lLX JDrKuh2qPgnc4lRBk3eg9Ksu++V4W9ioua/GeRvCz7Fw4x9Q4dPAPcfSZ3E1GHN+0bhL QEWpn1rxACok0kfUpdYzoZQLEFgwuOTMJWYAg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=ivoXcjFHO6rqnVXglWwu8+pZFlLFqavp6PXBbxmYHOSZSJpcgoY+zFl3IGmsS21ozT n/bARuvaej9ArGPu6tQaC1BZc4Bqyd31/rEA2c0fgPv7QqIb7jOPlOUW19hFTQyOQs0c U3/FGD3ub1UXmhPCCd+XJJReq+sPuzlP04wTc= In-Reply-To: <4CB69A25.3000000@gmail.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:731 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P6WxU-0000H6-DM for gclrug-mongrel-unicorn@m.gmane.org; Fri, 15 Oct 2010 01:11:36 +0200 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 7918A1858380; Thu, 14 Oct 2010 19:11:35 -0400 (EDT) Received: from mail-ww0-f54.google.com (mail-ww0-f54.google.com [74.125.82.54]) by rubyforge.org (Postfix) with ESMTP id C7C801858346 for ; Thu, 14 Oct 2010 19:01:24 -0400 (EDT) Received: by wwi18 with SMTP id 18so216284wwi.23 for ; Thu, 14 Oct 2010 16:01:24 -0700 (PDT) Received: by 10.216.19.13 with SMTP id m13mr10588495wem.101.1287097284046; Thu, 14 Oct 2010 16:01:24 -0700 (PDT) Received: by 10.216.70.213 with HTTP; Thu, 14 Oct 2010 16:01:03 -0700 (PDT) Thanks, Lawrence. ENV pollution was indeed the problem. The aforementioned exception was being caused by by Bundler 0.7 having set ENV['RUBYOPT'] to "-r/gems/environment.rb". After clearing that and setting my paths properly it worked. Thank you very much for pointing me in the right direction. Justin On Thu, Oct 14, 2010 at 1:50 AM, Lawrence Pit wrot= e: > =A0Hi Justin, > > See the paragraph "Other ENV pollution issues" at > http://unicorn.bogomips.org/Sandbox.html > > > Cheers, > Lawrence > >> Hello, >> >> First off, many thanks to all those who have contributed to this great >> project. I have been running Unicorn in production for quite some time >> now. It hass been very reliable and I have really enjoyed being able >> to deploy frequently without downtime or even dropped connections. >> >> I have used the USR2+QUIT upgrade procedure as described in SIGNALS >> since I started using Unicorn and it works great. However, while >> upgrading Bundler on my server the other day, an upgrade failed for >> the first time. The upgrade failed due to a LoadError --> root>/gems/environment.rb is no longer used in Bundler 1.0 so it was >> missing from the new application tree. >> >> I am using a Capistrano setup so my app is located at >> /path/to/app/current where current is a symlink to a timestamped >> release directory. I am calling #working_directory in my unicorn >> config to set it to the symlinked current path. I am also calling >> unicorn via a binstub generated by Bundler located at >> /path/to/app/current/bin/unicorn. >> >> I had expected that reexec would pick up the new unicorn and app code >> because the path to the unicorn executable script, the path to my app, >> and config files were all identical to those used in the previous >> deploy. However, this is not what is happening. Rather, it looks like >> the previous version of the code is trying to reload iteself in the >> new app tree where files are missing. >> >> I am having a very difficult time understanding exactly what files are >> being reloaded during the reexec. Even my attempts at troubleshooting >> where the load error is originating have left me completely baffled. >> In the old app gems/environment.rb is required in a few places but >> none of those files seem to be reloaded during the reexec. Further, I >> cannot get this executable swap to work no matter what I try. I have >> even tried getting rid of the symlinks entirely and changing the >> contents of the /path/to/app/current in place during the upgrade. >> >> I feel like I may be missing something obvious or else I have >> completely misunderstood how the reload process works. Any insight as >> to what I should be doing differently would be greatly appreciated. >> >> >> Justin >> _______________________________________________ >> 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 > _______________________________________________ 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