JezK
Edit File: page-KNOWN_ISSUES.ri
U:RDoc::TopLevel[ i I"KNOWN_ISSUES:ETcRDoc::Parser::Simpleo:RDoc::Markup::Document:@parts[ S:RDoc::Markup::Heading: leveli: textI"Known Issues;To:RDoc::Markup::BlankLine o:RDoc::Markup::Paragraph;[I"POccasionally odd {issues}[link:ISSUES.html] arise without a transparent or ;TI"<acceptable solution. Those issues are documented here.;T@ o:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0;[o; ;[ I"LSome libraries/applications may install signal handlers which conflict ;TI"Ewith signal handlers unicorn uses. Leaving "preload_app false" ;TI"I(the default) will allow unicorn to always override existing signal ;TI"handlers.;T@ o;;0;[o; ;[I"RIssues with FreeBSD jails can be worked around as documented by Tatsuya Ono: ;TI"lhttps://bogomips.org/unicorn-public/CAHBuKRj09FdxAgzsefJWotexw-7JYZGJMtgUp_dhjPz9VbKD6Q@mail.gmail.com/;T@ o;;0;[o; ;[ I"CPRNGs (pseudo-random number generators) loaded before forking ;TI"E(e.g. "preload_app true") may need to have their internal state ;TI"Dreset in the after_fork hook. Starting with unicorn 3.6.1, we ;TI"Ihave builtin workarounds for Kernel#rand and OpenSSL::Random users, ;TI"*but applications may use other PRNGs.;T@ o;;0;[o; ;[I"?For notes on sandboxing tools such as Bundler or Isolate, ;TI"/see the {Sandbox}[link:Sandbox.html] page.;T@ o;;0;[o; ;[I"=nginx with "sendfile on" under FreeBSD 8 is broken when ;TI"Fuploads are buffered to disk. Disabling sendfile is required to ;TI"Mwork around this bug which should be fixed in newer versions of FreeBSD.;T@ o;;0;[o; ;[I"GWhen using "preload_app true", with apps using background threads ;TI"Kneed to restart them in the after_fork hook because threads are never ;TI"Eshared with child processes. Additionally, any synchronization ;TI"Bprimitives (Mutexes, Monitors, ConditionVariables) should be ;TI"Creinitialized in case they are held during fork time to avoid ;TI"Kdeadlocks. The core Ruby Logger class needlessly uses a MonitorMutex ;TI"Qwhich can be disabled with a {monkey patch}[link:examples/logger_mp_safe.rb];T@ S; ; i;I"Known Issues (Old);T@ o;;;;[ o;;0;[ o; ;[I"LUnder some versions of Ruby 1.8, it is necessary to call +srand+ in an ;TI"Qafter_fork hook to get correct random number generation. We have a builtin ;TI"4workaround for this starting with unicorn 3.6.1;T@ o; ;[I"JSee http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/36450;T@ o;;0;[o; ;[I"HOn Ruby 1.8 prior to Ruby 1.8.7-p248, *BSD platforms have a broken ;TI"Kstdio that causes failure for file uploads larger than 112K. Upgrade ;TI">your version of Ruby or continue using unicorn 1.x/3.4.x.;T@ o;;0;[ o; ;[ I"HUnder Ruby 1.9.1, methods like Array#shuffle and Array#sample will ;TI"Fsegfault if called after forking. Upgrade to Ruby 1.9.2 or call ;TI"F"Kernel.rand" in your after_fork hook to reinitialize the random ;TI"number generator.;T@ o; ;[I"JSee http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/28655;T@ o;;0;[ o; ;[ I"IRails 2.3.2 bundles its own version of Rack. This may cause subtle ;TI"Gbugs when simultaneously loaded with the system-wide Rack Rubygem ;TI"Gwhich unicorn depends on. Upgrading to Rails 2.3.4 (or later) is ;TI"Kstrongly recommended for all Rails 2.3.x users for this (and security ;TI"Kreasons). Rails 2.2.x series (or before) did not bundle Rack and are ;TI"Fshould be unnaffected. If there is any reason which forces your ;TI"Gapplication to use Rails 2.3.2 and you have no other choice, then ;TI"Fyou may edit your unicorn gemspec and remove the Rack dependency.;T@ o; ;[I"Tref: https://bogomips.org/unicorn-public/20091014221552.GA30624@dcvr.yhbt.net/ ;TI"CNote: the workaround described in the article above only made ;TI"Athe issue more subtle and we didn't notice them immediately.;T@ o;;0;[ o; ;[ I"OWONTFIX: code reloading and restarts with Sinatra 0.3.x (and likely older ;TI"Fversions) apps is broken. The workaround is to force production ;TI"Gmode to disable code reloading as well as disabling "run" in your ;TI"Sinatra application:;To:RDoc::Markup::Verbatim;[I"set :env, :production ;TI"set :run, false ;T:@format0o; ;[ I"PSince this is no longer an issue with Sinatra 0.9.x apps, this will not be ;TI"Nfixed on our end. Since unicorn is itself the application launcher, the ;TI"Nat_exit handler used in old Sinatra always caused Mongrel to be launched ;TI"1whenever a unicorn worker was about to exit.;T@ o; ;[I"RAlso remember we're capable of replacing the running binary without dropping ;TI"/any connections regardless of framework :);T: @file@:0@omit_headings_from_table_of_contents_below0