allow binding on IPv6 sockets with listen "[#{addr}]:#{port}"
[unicorn.git] / KNOWN_ISSUES
blob259681d533b47dbeebdd9d08f69fe28acae7ee15
1 = Known Issues
3 Occasionally odd {issues}[link:ISSUES.html] arise without a transparent or
4 acceptable solution.  Those issues are documented here.
6 * Under some versions of Ruby 1.8, it is necessary to call +srand+ in an
7   after_fork hook to get correct random number generation.
9   See http://redmine.ruby-lang.org/issues/show/4338
11 * For notes on sandboxing tools such as Bundler or Isolate,
12   see the {Sandbox}[link:Sandbox.html] page.
14 * nginx with "sendfile on" under FreeBSD 8 is broken when
15   uploads are buffered to disk.  Disabling sendfile is required to
16   work around this bug which should be fixed in newer versions of FreeBSD.
18 * When using "preload_app true", with apps using background threads
19   need to restart them in the after_fork hook because threads are never
20   shared with child processes.  Additionally, any synchronization
21   primitives (Mutexes, Monitors, ConditionVariables) should be
22   reinitialized in case they are held during fork time to avoid
23   deadlocks.  The core Ruby Logger class needlessly uses a MonitorMutex
24   which can be disabled with a {monkey patch}[link:examples/logger_mp_safe.rb]
26 == Known Issues (Old)
28 * Under Ruby 1.9.1, methods like Array#shuffle and Array#sample will
29   segfault if called after forking.  Upgrade to Ruby 1.9.2 or call
30   "Kernel.rand" in your after_fork hook to reinitialize the random
31   number generator.
33   See http://redmine.ruby-lang.org/issues/show/2962 for more details
35 * Rails 2.3.2 bundles its own version of Rack.  This may cause subtle
36   bugs when simultaneously loaded with the system-wide Rack Rubygem
37   which Unicorn depends on.  Upgrading to Rails 2.3.4 (or later) is
38   strongly recommended for all Rails 2.3.x users for this (and security
39   reasons).  Rails 2.2.x series (or before) did not bundle Rack and are
40   should be unnaffected.  If there is any reason which forces your
41   application to use Rails 2.3.2 and you have no other choice, then
42   you may edit your Unicorn gemspec and remove the Rack dependency.
44   ref: http://mid.gmane.org/20091014221552.GA30624@dcvr.yhbt.net
45   Note: the workaround described in the article above only made
46   the issue more subtle and we didn't notice them immediately.
48 * WONTFIX: code reloading and restarts with Sinatra 0.3.x (and likely older
49   versions) apps is broken.  The workaround is to force production
50   mode to disable code reloading as well as disabling "run" in your
51   Sinatra application:
52     set :env, :production
53     set :run, false
54   Since this is no longer an issue with Sinatra 0.9.x apps, this will not be
55   fixed on our end.  Since Unicorn is itself the application launcher, the
56   at_exit handler used in old Sinatra always caused Mongrel to be launched
57   whenever a Unicorn worker was about to exit.
59   Also remember we're capable of replacing the running binary without dropping
60   any connections regardless of framework :)