Files | Admin

Notes:

Release Name: 3.6.2

Notes:
unicorn 3.6.2 - fix Unicorn::OobGC module

Unicorn is an HTTP server for Rack applications designed to only serve
fast clients on low-latency, high-bandwidth connections and take
advantage of features in Unix/Unix-like kernels.  Slow clients should
only be served by placing a reverse proxy capable of fully buffering
both the the request and response in between unicorn and slow clients.

* http://unicorn.bogomips.org/
* mongrel-unicorn@rubyforge.org
* git://bogomips.org/unicorn.git

Changes:

The optional Unicorn::OobGC module is reimplemented to fix
breakage that appeared in v3.3.1.  There are also minor
documentation updates, but no code changes as of 3.6.1 for
non-OobGC users.

There is also a v1.1.7 release to fix the same OobGC breakage
that appeared for 1.1.x users in the v1.1.6 release.



Changes: GIT-VERSION-GEN | 2 +- TUNING | 40 ++++++++++++---- examples/big_app_gc.rb | 35 +------------- examples/nginx.conf | 13 ++++-- lib/unicorn/configurator.rb | 24 +++++++--- lib/unicorn/const.rb | 4 +- lib/unicorn/oob_gc.rb | 111 +++++++++++++++++++++++------------------- t/oob_gc.ru | 21 ++++++++ t/oob_gc_path.ru | 21 ++++++++ t/t9001-oob_gc.sh | 47 ++++++++++++++++++ t/t9002-oob_gc-path.sh | 75 +++++++++++++++++++++++++++++ 11 files changed, 287 insertions(+), 106 deletions(-) commit f848f632a81cf8ebc977592cbf9a45d84a69f306 Author: Eric Wong Date: Sat Apr 30 06:34:52 2011 +0000 unicorn 3.6.2 - fix Unicorn::OobGC module The optional Unicorn::OobGC module is reimplemented to fix breakage that appeared in v3.3.1. There are also minor documentation updates, but no code changes as of 3.6.1 for non-OobGC users. There is also a v1.1.7 release to fix the same OobGC breakage that appeared for 1.1.x users in the v1.1.6 release. commit 1588c299703754e52b9f36219c21e13204734e6c Merge: fe47a17 0874125 Author: Eric Wong Date: Sat Apr 30 06:33:53 2011 +0000 Merge commit 'v1.1.7' * commit 'v1.1.7': unicorn 1.1.7 - major fixes to minor components oob_gc: reimplement to fix breakage and add tests exec_cgi: handle Status header in CGI response unicorn 1.1.6 - one minor, esoteric bugfix close client socket after closing response body commit fe47a179468799bbbb893b339cbb0d4fedf29c2a Author: Eric Wong Date: Fri Apr 29 23:31:35 2011 -0700 TUNING: more minor doc updates commit 0874125ce56d52cee0f634712e69d1387eadfae1 Author: Eric Wong Date: Sat Apr 30 04:56:28 2011 +0000 unicorn 1.1.7 - major fixes to minor components No changes to the core code, so this release only affects users of the Unicorn::OobGC and Unicorn::ExecCGI modules. Unicorn::OobGC was totally broken by the fix in the v1.1.6 release and is now reimplemented. Unicorn::ExecCGI (which hardly anybody uses) now returns proper HTTP status codes. commit fe0dd93cd9cb97b46f6cfb4b1e370e38717a93f0 Author: Eric Wong Date: Fri Apr 29 15:48:35 2011 -0700 oob_gc: reimplement to fix breakage and add tests This was broken since v3.3.1[1] and v1.1.6[2] since nginx relies on a closed socket (and not Content-Length/Transfer-Encoding) to detect a response completion. We have to close the client socket before invoking GC to ensure the client sees the response in a timely manner. [1] - commit b72a86f66c722d56a6d77ed1d2779ace6ad103ed [2] - commit b7a0074284d33352bb9e732c660b29162f34bf0e (cherry picked from commit faeb3223636c39ea8df4017dc9a9d39ac649b26d) Conflicts: examples/big_app_gc.rb lib/unicorn/oob_gc.rb commit 02a116c0d94a60a64abf8ad2465132e8194dd62a Author: Eric Wong Date: Fri Apr 29 16:01:35 2011 -0700 TUNING: document worker_processes tuning It seems people are still confused about it... commit faeb3223636c39ea8df4017dc9a9d39ac649b26d Author: Eric Wong Date: Fri Apr 29 15:48:35 2011 -0700 oob_gc: reimplement to fix breakage and add tests This was broken since v3.3.1[1] since nginx relies on a closed socket (and not Content-Length/Transfer-Encoding) to detect a response completion. We have to close the client socket before invoking GC to ensure the client sees the response in a timely manner. [1] - commit b72a86f66c722d56a6d77ed1d2779ace6ad103ed commit ce4995a4daf1e4da7034dc87fd218a283c405410 Author: Eric Wong Date: Fri Apr 29 15:30:07 2011 -0700 TUNING: original sentence was incomplete commit 843d30120139dc372aca6c1773ac7699b6ee6345 Author: Eric Wong Date: Fri Apr 29 12:21:38 2011 -0700 examples/big_app_gc: fix comment Oops, comments should match the latest code commit d4f70c45029ab1c6aba4bc2d69283ae43e46d9ff Author: Eric Wong Date: Fri Apr 29 12:18:59 2011 -0700 examples/big_app_gc: update this example OobGC is actually broken with nginx these days since we needed to preserve the env for body.close... commit eaf72275e36560e567efc9597d929e02dc2f577d Author: Eric Wong Date: Wed Apr 27 13:49:14 2011 -0700 configurator: attempt to clarify :tcp_nopush/:tcp_nodelay These options will probably be more important as interest in streaming responses in Rails 3.1 develops. I consider the respective defaults for Unicorn (designed to run behind nginx) and Rainbows! (designed to run standalone) to be the best choices in their respective environments. commit 37c491dcc23d445521229dbe902f02833f2a0f4c Author: Eric Wong Date: Wed Apr 27 13:13:24 2011 -0700 examples/nginx.conf: clarify proxy_buffering for Rails 3.1 I've tested with nginx 1.0.0 and confirmed "proxy_buffering off;" can cause Unicorn to block on a slow client reading a large response. While there's a potential (client-visible) performance improvement with Rails 3.1 streaming responses, it can also hurt the server with slow clients. Rainbows! with (ThreadSpawn or ThreadPool) is probably the best way to do streaming responses efficiently from all angles (from a server, client and programmer time perspective). commit d385bc4f3ed7b783b7414f5d34299bd2bf242fe6 Author: Eric Wong Date: Fri Jan 21 04:01:01 2011 +0000 exec_cgi: handle Status header in CGI response We no longer blindly return 200 if the CGI returned another error code. We also don't want two Status headers in our output since we no longer filter it out. (cherry picked from commit 6cca8e61c66c1c2a8ebe260813fa83e44530a768) commit 3587edb6e88ebe5c24cdde090ba8dd98de493d63 Author: Eric Wong Date: Thu Jan 6 15:40:54 2011 -0800 unicorn 1.1.6 - one minor, esoteric bugfix We now close the client socket after closing the response body. This does not affect most applications that run under Unicorn, in fact, it may not affect any. commit b7a0074284d33352bb9e732c660b29162f34bf0e Author: Eric Wong Date: Wed Jan 5 23:05:05 2011 -0800 close client socket after closing response body Response bodies may capture the block passed to each and save it for body.close, so don't close the socket before we have a chance to call body.close (cherry picked from commit b72a86f66c722d56a6d77ed1d2779ace6ad103ed) Conflicts: lib/unicorn/http_server.rb test/unit/test_response.rb