Known Issues
Occasionally odd issues arise without a
transparent or acceptable solution. Those issues are documented here.
Known Issues (Old)
- Under Ruby 1.9.1, methods like Array#shuffle and Array#sample will segfault
if called after forking. Upgrade to Ruby 1.9.2 or call
"Kernel.rand" in your after_fork hook to reinitialize the random
number generator.
See redmine.ruby-lang.org/issues/show/2962
for more details
- Rails 2.3.2 bundles its own version of Rack. This may cause subtle bugs
when simultaneously loaded with the system-wide Rack Rubygem which Unicorn depends on. Upgrading to Rails
2.3.4 (or later) is strongly recommended for all Rails 2.3.x users for this
(and security reasons). Rails 2.2.x series (or before) did not bundle Rack
and are should be unnaffected. If there is any reason which forces your
application to use Rails 2.3.2 and you have no other choice, then you may
edit your Unicorn gemspec and remove
the Rack dependency.
ref: mid.gmane.org/20091014221552.GA30624@dcvr.yhbt.net
Note: the workaround described in the article above only made the issue
more subtle and we didn‘t notice them immediately.
- WONTFIX: code reloading and restarts with Sinatra 0.3.x (and likely older
versions) apps is broken. The workaround is to force production mode to
disable code reloading as well as disabling "run" in your Sinatra
application:
set :env, :production
set :run, false
Since this is no longer an issue with Sinatra 0.9.x apps, this will not be
fixed on our end. Since Unicorn is
itself the application launcher, the at_exit handler used in old Sinatra
always caused Mongrel to be launched whenever a Unicorn worker was about to exit.
Also remember we‘re capable of replacing the running binary without
dropping any connections regardless of framework :)