unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Jamie Wilkinson <jamie@tramchase.com>
To: unicorn list <mongrel-unicorn@rubyforge.org>,
	tech <tech@efficiency20.com>
Subject: Re: Unicorn fails to restart gracefully on capistrano deploy
Date: Thu, 9 Sep 2010 17:19:35 -0700	[thread overview]
Message-ID: <94DA7535-598C-4C42-8D81-91D5A98183EF@tramchase.com> (raw)
In-Reply-To: <162ABE91-E653-45BE-B611-AF6C2B37CC4B@efficiency20.com>

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
Do not quote signatures (like this one) or top post when replying

  reply	other threads:[~2010-09-10  0:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-09 23:28 Unicorn fails to restart gracefully on capistrano deploy Eirik Dentz Sinclair
2010-09-10  0:19 ` Jamie Wilkinson [this message]
2010-09-10  1:16   ` Lawrence Pit
2010-09-15  6:40 Eirik Dentz Sinclair
2010-09-15 21:52 ` Eric Wong

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:

  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=94DA7535-598C-4C42-8D81-91D5A98183EF@tramchase.com \
    --to=jamie@tramchase.com \
    --cc=mongrel-unicorn@rubyforge.org \
    --cc=tech@efficiency20.com \


* 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


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).