about summary refs log tree commit homepage
DateCommit message (Collapse)
2010-06-10Rakefile: only try rake-compiler if VERSION is defined
Our gemspec won't work without it
2010-06-10isolate: don't run isolate in parallel
~/.gems is still shared, and we don't isolate *that* often enough to matter
2010-06-10launcher: get rid of backwards compatibility code
Rainbows! and Zbatery have long been upgraded to pass options to us.
2010-06-08tests: add Rails 3 test for the missing config.ru case
In case we have weird Rails 3 users who choose to ignore config.ru, we'll be ready.
2010-06-08unicorn_rails: fix requires for Ruby 1.9.2
Ruby 1.9.2 no longer includes "." in $LOAD_PATH, so we need to require using an explicit path. This issue only affected Rails 3 users who chose to run without the default config.ru, as the config.ru generated by Rails 3 will call File.expand_path in the same way.
2010-06-08tests: libify common rails3 setup code
We'll be adding more Rails 3 tests..
2010-06-08Fix unicorn_rails compatibility with the latest Rails 3 code
This allows us to properly detect Rails 3 installations in cases where config.ru is not present. [ew: expanded commit message fixed static file serving, more flexible regexp for matching module ] ref: mid.gmane.org/AANLkTiksBxIo_PFWoiPTWi1entXZRb7D2uE-Rl7H3lbw@mail.gmail.com Acked-by: Eric Wong <normalperson@yhbt.net>
2010-06-08t0300: Rails 3 test actually uses unicorn_rails
Oops, but unicorn_rails appears to work well here
2010-06-08unicorn 0.990.0 - inching towards 1.0 v0.990.0
Thanks to Augusto Becciu for finding a bug in the HTTP parser that caused a TypeError (and 500) when a rare client set the "Version:" header which conflicts with the HTTP_VERSION header we parse in the first line of the request[1]. Horizontal tabs are now allowed as leading whitespace in header values as according to RFC 2616 as pointed out by Iñaki Baz Castillo[2]. Taking a hint from Rack 1.1, the "logger" configuration parameter no longer requires a "close" method. This means some more Logger replacements may be used. There's a new, optional, Unicorn (and maybe Passenger)-only middleware, Unicorn::OobGC[2] that runs GC outside of the normal request/response cycle to help out memory-hungry applications. Thanks to Luke Melia for being brave enough to test and report back on my big_app_gc.rb monkey patch[3] which lead up to this. Rails 3 (beta) support: Using "unicorn" is still recommended as Rails 3 comes with a config.ru, but "unicorn_rails" is cleaned up a bit and *should* work as well as "unicorn" out-of-the-box. Feedback is much appreciated. Rubinius updates: USR2 binary upgrades are broken due to {TCPServer,UNIXServer}.for_fd[5][6] being broken (differently). Repeatedly hitting the server with signals in a tight loop is unusual and not recommended[7]. There are some workarounds and general code cleanups for other issues[8], as well but things should generally work unless you need USR2 upgrades. Feedback and reports would be greatly appreciated as usual. MRI support: All tests (except old Rails) run and pass under 1.9.2-preview3. 1.8.7 and 1.9.1 work well as usual and will continue to be supported indefinitely. Lets hope this is the last release before 1.0. Please report any issues on the mailing list[9] or email us privately[a]. Don't send HTML mail. [1] - http://mid.gmane.org/AANLkTimuGgcwNAMcVZdViFWdF-UcW_RGyZAue7phUXps@mail.gmail.com [2] - http://mid.gmane.org/i2xcc1f582e1005070651u294bd83oc73d1e0adf72373a@mail.gmail.com [3] - http://unicorn.bogomips.org/Unicorn/OobGC.html [4] - http://unicorn.bogomips.org/examples/big_app_gc.rb [5] - http://github.com/evanphx/rubinius/issues/354 [6] - http://github.com/evanphx/rubinius/issues/355 [7] - http://github.com/evanphx/rubinius/issues/356 [8] - http://github.com/evanphx/rubinius/issues/347 [9] - mailto:mongrel-unicorn@rubyforge.org [a] - mailto:unicorn@bogomips.org
2010-06-08cleanup makefiles, restore aggregation screwup
The publish_doc target belongs in main, since other people may update the website. local.mk.sample enables a subset of tests for Rubinius and allows them to run in parallel with the MRI tests. And it was NOT a UUoC after all, there are multiple files to aggregate :x
2010-06-08GNUmakefile: add test-all and test-integration targets
Long overdue
2010-06-08test: mark failing tests for Rubinius
They cannot be worked around, but tickets have been filed upstream (I still hate all bug trackers besides Debian's). TCPServer.for_fd (needed for zero-downtime upgrades): http://github.com/evanphx/rubinius/issues/354 UnixServer.for_fd (needed for zero-downtime upgrades): http://github.com/evanphx/rubinius/issues/355 Signal handling behavior seems broken (OOM or segfaults): http://github.com/evanphx/rubinius/issues/356
2010-06-08update test infrastructure to run Rubinius tests
In parallel with other of Rubies, of course. We need to rely on RUBY_ENGINE since RUBY_VERSION is 1.8.7 and that conflicts with the most popular MRI version. Since Rubinius doesn't support some command-line options, we still need to rely on MRI for a few things. Also fixing an embarrassing UUoC in the process.
2010-06-08reopen_logs: no need to preserve encoding args
Since we accidentally dropped open_args a while back, nothing seems to have broken :x So apparently MRI preserves it for us, and test/unit/test_util.rb agrees.
2010-06-08test_socket_helper: additional test for path equality
This fails under Rubinius. ref: http://github.com/evanphx/rubinius/issues/355
2010-06-08reopen_logs: avoid modifying ObjectSpace while iterating
Creating File objects while iterating ObjectSpace for File objects may hit subtle bugs. It may only be safe in MRI, and even then it's not behavior that sounds sane to rely on. So stop doing it.
2010-06-08spew backtrace when config reloading fails
It can be useful to track down problems with
2010-06-08test-exec: fix racyness in HUP test
I'm not sure what I was smoking when I originally (and knowingly) wrote the racy code.
2010-06-08cleanup master_sleep loop
No need for extra checks when we're just doing read_nonblock. We'll also avoid reallocating a 16K buffer every time we sleep, we can just reuse the buffer the workers normally use to process request.
2010-06-08test_http_parser: memory usage test for non-MRI
Non-MRI runtimes (like Rubinius) may implement garbage collection very differently than MRI.
2010-06-08workaround IO#reopen bug in rbx when reopening logs
IO#reopen in Rubinius seems to munge the O_APPEND flag when passed a path, however passing an actual IO object. However, at the system call level, everything is the same. ref: http://github.com/evanphx/rubinius/issues/347
2010-06-08http: move Version: header check into a less common path
Since the "Version" header is uncommon and never hits our optimized case, we don't need to check for it in the common case.
2010-06-08http: ignore Version: header if explicitly set by client
When Unicorn receives a request with a "Version" header, the HttpParser transforms it into "HTTP_VERSION". After that tries to add it to the request hash which already contains a "HTTP_VERSION" key with the actual http version of the request. So it tries to append the new value separated by a comma. But since the http version is a freezed constant, the TypeError exception is raised. According to the HTTP RFC (http://www.w3.org/Protocols/rfc2616/rfc2616-sec7.html#sec7.1) a "Version" header is valid. However, it's not supported in rack, since rack has a HTTP_VERSION env variable for the http version. So I think the easiest way to deal with this problem is to just ignore the header since it is extremely unusual. We were getting it from a crappy bot. ref: http://mid.gmane.org/AANLkTimuGgcwNAMcVZdViFWdF-UcW_RGyZAue7phUXps@mail.gmail.com Acked-by: Eric Wong <normalperson@yhbt.net>
2010-06-05File.readable? and File.writable? are more readable
...than "test ?r" and "test ?w" Not everybody comes from a Unix shell programming background, even though they *should* ;)
2010-06-04configurator: logger: drop "close" requirement
Rack::Lint in Rack 1.1.0 does not require a "close" method for env["rack.logger"], and we never explicitly close our logger, either. This more easily allows the use of alternative Logger-like implementations such as SyslogLogger.
2010-06-04doc: emphasize the importance of stderr_path
While second nature to myself, stderr_path may be an overlooked configuration parameter for some users. Also, add a minimal sample configuration file that is shorter and hopefully less intimidating to new users.
2010-06-04tests: disable Rails 2.x tests under Ruby 1.9.2
They are not compatible, and the Rails 3 tests will be completely separate.
2010-06-03gemspec: add development dependency on isolate
2010-06-03test: rails 3: automatically run isolate if needed
should be safe enough...
2010-06-03test: http_parser_ng: fix broken assertion
This was noticed by running under Ruby 1.9.2-preview3
2010-06-03tests: add preliminary Rails 3 tests
We'll be switching to Isolate and shell-based tests since the old test/unit-based Rails test was basically a shell script written in Ruby.
2010-06-03move Rails 2.3.x test to Rails 2.3.8
This allows us to gets rid of the Rack 1.0.1 dependency when running Rails tests since previous versions of Rails 2.3.x needed Rack 1.0.1, where as Rails 2.2.x and below could be used with any version of Rack (under Unicorn only).
2010-06-03unicorn_rails: avoid duplicating config.ru logic
This should allow "unicorn_rails" to be used seamlessly with Rails 3 projects which package config.ru for you.
2010-05-18doc: PHILOSOPHY: update Rainbows! section
2010-05-18doc: Sandbox: updates for Isolate 2.x
Isolate 2.0.0 appears to have quietly released, so update the docs for it. Fix capitalization while we're at it, too.
2010-05-18doc: unicorn.1: the command name is "unicorn"
2010-05-14add Unicorn::OobGC middleware
This middleware allows configurable out-of-band garbage collection outside of the normal request/response cycle. It offers configurable paths (to only GC on expensive actions) and intervals to limit GC frequency. It is only expected to work well with Unicorn, as it would hurt performance on single-threaded servers if they have keepalive enabled. Obviously this does not work well for multi-threaded or evented servers that serve multiple clients at once.
2010-05-07doc: KNOWN_ISSUES: add Sandbox page link
2010-05-07doc: add Sandbox document for bundler/isolate users
This may be expanded to cover other similar tools, as well, including tools that don't use RubyGems.
2010-05-07http: allow horizontal tab as leading whitespace in header values
This is allowed by RFC 2616, section 2.2, where spaces and horizontal tabs are counted as linear white space and linear white space (not just regular spaces) may prefix field-values (section 4.2). This has _not_ been a real issue in ~4 years of using this parser (starting with Mongrel) with clients in the wild. Thanks to Iñaki Baz Castillo for pointing this out.
2010-05-06doc: kill Dir.chdir example
Modern version of Unicorn have working_directory available and should use that instead.
2010-05-06examples: add big_app_gc monkey patch
2010-05-06unicorn 0.99.0 - simplicity wins v0.99.0
Starting with this release, we'll always load Rack up front at startup. Previously we had complicated ways to avoid loading Rack until after the application was loaded to allow the application to load an alternate version of Rack. However this has proven too error-prone to be worth supporting even though Unicorn does not have strict requirements on currently released Rack versions. If an app requires a different version of Rack than what Unicorn would load by default, it is recommended they only install that version of Rack (and no others) since Unicorn does not have any strict requirements on currently released Rack versions. Rails 2.3.x users should be aware of this as those versions are not compatible with Rack 1.1.0. If it is not possible to only have one Rack version installed "globally", then they should either use Isolate or Bundler and install a private version of Unicorn along with their preferred version of Rack. Users who install in this way are recommended to execute the isolated/bundled version of Unicorn, instead of what would normally be in $PATH. Feedback/tips to mailto:mongrel-unicorn@rubyforge.org from Isolate and Bundler users would be greatly appreciated.
2010-05-06always load Rack up front at startup
It's too complicated and error-prone to allow apps to use a different version of Rack than the one Unicorn would otherwise use by default. If an app requires a different version of Rack than what Unicorn would load by default, it is recommended they only install that version of Rack (and no others) since Unicorn does not have any strict requirements on currently released Rack versions. If it is not possible to only have one Rack version installed globally, then they should either use Isolate or Bundler and install a private version of Unicorn along with their preferred version of Rack. Users who install in this way are recommended to execute the isolated/bundled version of Unicorn, instead of what would normally be in $PATH. Feedback/tips to mailto:mongrel-unicorn@rubyforge.org from Isolate and Bundler users would be greatly appreciated.
2010-05-06GNUmakefile: update RAA and Freshmeat on release
2010-05-04unicorn 0.98.0 v0.98.0
Deployments that suspend or hibernate servers should no longer have workers killed off (and restarted) upon resuming. For Linux users of {raindrops}[http://raindrops.bogomips.org/] (v0.2.0+) configuration is easier as raindrops can now automatically detect the active listeners on the server via the new Unicorn.listener_names singleton method. For the pedantic, chunked request bodies without trailers are no longer allowed to omit the final CRLF. This shouldn't affect any real and RFC-compliant clients out there. Chunked requests with trailers have always worked and continue to work the same way. The rest are mostly small internal cleanups and documentation fixes. See the commit logs for full details.
2010-05-04README: avoid needless links to /Unicorn.html module
It makes the HTML page too big and busy.
2010-04-30add global Unicorn.listener_names method
This is useful as a :listeners argument when setting up Raindrops::Middleware (http://raindrops.bogomips.org/), as it can be done automatically.
2010-04-26GNUmakefile: fix backwards compat links for manpages
2010-04-26GNUmakefile: rdoc 2.5.x compatibility