unicorn 3.6.0 release soon

Eric Wong normalperson at yhbt.net
Tue Apr 19 14:13:48 EDT 2011

Mainly small fixes, improvements, and workarounds for fork() issues
with pseudo-random number generators shipped with Ruby (Kernel#rand,
OpenSSL::Random (used by SecureRandom and also by Rails).

If there are any other fixes/improvements that could be useful let us
know.  I think this is nearing the end of the line for the 3.x series
which will then go into maintenance mode.  I'm looking at 4.x being the
crazy series that allows us to run thousands of worker _processes_ and
scale to mythical 4096 core systems :)

The PRNG issues are documented in depth here (and links to Ruby Redmine):


If you're too lazy to upgrade, you can just do this in your after_fork

  after_fork do |server,worker|
    tmp = srand
    OpenSSL::Random.seed(tmp.to_s) if defined?(OpenSSL::Random)

There are also small log reopening (SIGUSR1) improvements:

* relative paths may also be reopened, there's a small chance this
  will break with a handful of setups, but unlikely.  This should
  make configuration easier especially since the "working_directory"
  configurator directive exists.  Brought up by Matthew Kocher:

* workers will just die (and restart) if log reopening fails for
  any reason (including user error).  This is to workaround the issue
  reported by Emmanuel Gomez:

Eric Wong

More information about the mongrel-unicorn mailing list