summary refs log tree commit homepage
AgeCommit message (Collapse)AuthorFilesLines
2010-06-10Rakefile: only try rake-compiler if VERSION is definedEric Wong1-1/+1
Our gemspec won't work without it
2010-06-10isolate: don't run isolate in parallelEric Wong1-5/+9
~/.gems is still shared, and we don't isolate *that* often enough to matter
2010-06-10launcher: get rid of backwards compatibility codeEric Wong1-33/+31
Rainbows! and Zbatery have long been upgraded to pass options to us.
2010-06-08tests: add Rails 3 test for the missing caseEric Wong1-0/+33
In case we have weird Rails 3 users who choose to ignore, we'll be ready.
2010-06-08unicorn_rails: fix requires for Ruby 1.9.2Eric Wong1-2/+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, as the generated by Rails 3 will call File.expand_path in the same way.
2010-06-08tests: libify common rails3 setup codeEric Wong2-29/+28
We'll be adding more Rails 3 tests..
2010-06-08Fix unicorn_rails compatibility with the latest Rails 3 codeHongli Lai (Phusion)1-2/+24
This allows us to properly detect Rails 3 installations in cases where is not present. [ew: expanded commit message fixed static file serving, more flexible regexp for matching module ] ref: Acked-by: Eric Wong <>
2010-06-08t0300: Rails 3 test actually uses unicorn_railsEric Wong1-1/+1
Oops, but unicorn_rails appears to work well here
2010-06-08unicorn 0.990.0 - inching towards 1.0 v0.990.0Eric Wong3-3/+5
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, 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] - [2] - [3] - [4] - [5] - [6] - [7] - [8] - [9] - [a] -
2010-06-08cleanup makefiles, restore aggregation screwupEric Wong2-38/+56
The publish_doc target belongs in main, since other people may update the website. 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 targetsEric Wong1-0/+5
Long overdue
2010-06-08test: mark failing tests for RubiniusEric Wong3-5/+9
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): UnixServer.for_fd (needed for zero-downtime upgrades): Signal handling behavior seems broken (OOM or segfaults):
2010-06-08update test infrastructure to run Rubinius testsEric Wong4-9/+17
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 argsEric Wong1-6/+1
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 equalityEric Wong1-0/+2
This fails under Rubinius. ref:
2010-06-08reopen_logs: avoid modifying ObjectSpace while iteratingEric Wong1-3/+6
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 failsEric Wong1-1/+1
It can be useful to track down problems with
2010-06-08test-exec: fix racyness in HUP testEric Wong1-3/+16
I'm not sure what I was smoking when I originally (and knowingly) wrote the racy code.
2010-06-08cleanup master_sleep loopEric Wong1-4/+4
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-MRIEric Wong1-1/+3
Non-MRI runtimes (like Rubinius) may implement garbage collection very differently than MRI.
2010-06-08workaround IO#reopen bug in rbx when reopening logsEric Wong2-19/+23
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:
2010-06-08http: move Version: header check into a less common pathEric Wong1-11/+14
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 clientAugusto Becciu2-0/+29
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 ( 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: Acked-by: Eric Wong <>
2010-06-05File.readable? and File.writable? are more readableEric Wong3-5/+5
...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" requirementEric Wong1-2/+2
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_pathEric Wong3-7/+40
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.2Eric Wong1-0/+4
They are not compatible, and the Rails 3 tests will be completely separate.
2010-06-03gemspec: add development dependency on isolateEric Wong1-0/+2
2010-06-03test: rails 3: automatically run isolate if neededEric Wong1-3/+4
should be safe enough...
2010-06-03test: http_parser_ng: fix broken assertionEric Wong1-1/+1
This was noticed by running under Ruby 1.9.2-preview3
2010-06-03tests: add preliminary Rails 3 testsEric Wong35-0/+458
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.8Eric Wong18-3/+9
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 logicEric Wong1-36/+14
This should allow "unicorn_rails" to be used seamlessly with Rails 3 projects which package for you.
2010-05-18doc: PHILOSOPHY: update Rainbows! sectionEric Wong1-2/+3
2010-05-18doc: Sandbox: updates for Isolate 2.xEric Wong1-7/+7
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"Eric Wong1-1/+1
2010-05-14add Unicorn::OobGC middlewareEric Wong1-0/+58
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 linkEric Wong1-0/+3
2010-05-07doc: add Sandbox document for bundler/isolate usersEric Wong3-24/+79
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 valuesEric Wong2-1/+9
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 exampleEric Wong1-6/+0
Modern version of Unicorn have working_directory available and should use that instead.
2010-05-06examples: add big_app_gc monkey patchEric Wong1-0/+33
2010-05-06unicorn 0.99.0 - simplicity wins v0.99.0Eric Wong2-2/+2
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 from Isolate and Bundler users would be greatly appreciated.
2010-05-06always load Rack up front at startupEric Wong1-14/+2
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 from Isolate and Bundler users would be greatly appreciated.
2010-05-06GNUmakefile: update RAA and Freshmeat on releaseEric Wong1-0/+2
2010-05-04unicorn 0.98.0 v0.98.0Eric Wong3-3/+3
Deployments that suspend or hibernate servers should no longer have workers killed off (and restarted) upon resuming. For Linux users of {raindrops}[] (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 moduleEric Wong1-13/+13
It makes the HTML page too big and busy.
2010-04-30add global Unicorn.listener_names methodEric Wong3-0/+13
This is useful as a :listeners argument when setting up Raindrops::Middleware (, as it can be done automatically.
2010-04-26GNUmakefile: fix backwards compat links for manpagesEric Wong1-3/+4
2010-04-26GNUmakefile: rdoc 2.5.x compatibilityEric Wong2-7/+10