How to avoid updating the list of gems

I see the following statement when running a rails application using a unicorn, what it does and how to avoid it:

I, [2013-03-28T06:46:05.060194 #1762] INFO -- : worker=0 spawning... I, [2013-03-28T06:46:05.066834 #2137] INFO -- : worker=0 spawned pid=2137 I, [2013-03-28T06:46:05.067210 #2137] INFO -- : Refreshing Gem list 
+7
source share
1 answer

The magazine we presented contains:

worker = 0 spawning

A worker that will respond to your HTTP requests is generated as a separate process using pid 2137 .

Gem List Update

According to Unicorn's official documentation ( http://unicorn.bogomips.org/SIGNALS.html ), the Gem set is reloaded so that "the updated code for your application can pick up the recently installed RubyGems"

Looking at the source code, each time the application is created, the message "Updating the list of gems" is called up:

 def build_app! if app.respond_to?(:arity) && app.arity == 0 if defined?(Gem) && Gem.respond_to?(:refresh) logger.info "Refreshing Gem list" Gem.refresh end self.app = app.call end end end 

There is no custom way to avoid this unless you want to decapitate this very method so that Gem does not reload it.

+7
source

All Articles