Should USR2 always work?

Eric Wong normalperson at yhbt.net
Mon Nov 21 22:00:38 EST 2011


Lawrence Pit <lawrence.pit at gmail.com> wrote:
> Bundler has been updated several times this year, I guess every time
> that happens and a new version gets installed a complete restart of
> unicorn is required? Am I the only one seeing this?

Managing bunder has always been tricky, unfortunately.

> Perhaps I'm managing bundler wrong? Bundler and rake are the only two
> gems I install in the global gem space. With an update of bundler I do
> "gem uninstall bundler ; gem bundler install". Should I manage this
> differently?

I brought up a "bring-your-own-executable" deployment a few months ago
but haven't heard any feedback.  Here it is for Bundler:

   http://mid.gmane.org/20110819022316.GA2951@dcvr.yhbt.net

I am also using something very similar with Isolate:

------------- /full/path/to/app_root/script/unicorn-byoe ---------
#!/home/ew/ruby-1.9.3/bin/ruby
# Unicorn: bring-your-own executable
require "isolate/now"
$LOAD_PATH << "./lib"
load Gem.bin_path("unicorn", "unicorn")
------------------------------- 8< -------------------------------

I run the path using the full pathname, so there's less ambiguity as to
what gets captured as $0 and executed on USR2.

I don't know of anybody else doing/trying this, though.


More information about the mongrel-unicorn mailing list