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