unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* unicorn 3.6.0 release soon
@ 2011-04-19 18:13 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2011-04-19 18:13 UTC (permalink / raw)
  To: mongrel-unicorn

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

  http://bogomips.org/unicorn.git/commit?id=1107ede7
  http://bogomips.org/unicorn.git/commit?id=b3241621


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

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

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:
  http://thread.gmane.org/gmane.comp.lang.ruby.unicorn.general/900

* 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:
  http://thread.gmane.org/gmane.comp.lang.ruby.unicorn.general/906

-- 
Eric Wong
_______________________________________________
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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-04-19 18:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-19 18:13 unicorn 3.6.0 release soon Eric Wong

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

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