Unicorn Changelog

What's new in Unicorn 4.8.3

Oct 16, 2014
  • This release updates documentation to reflect the migration of the mailing list to a new public-inbox instance. This is necessary due to the impending RubyForge shutdown on May 15, 2014.

New in Unicorn 4.8.2 (Feb 6, 2014)

  • We close SELF_PIPE in the worker immediately, but signal handlers do not get setup immediately. So prevent workers from erroring out due to invalid SELF_PIPE.

New in Unicorn 4.8.1 (Jan 29, 2014)

  • Fix races/error handling in worker SIGQUIT handler

New in Unicorn 4.8.0 (Jan 11, 2014)

  • This release contains fairly major internal workings of master-to-worker notifications. The master process no longer sends signals to workers for most tasks. This works around some compatibility issues with some versions of the "pg" gem (and potentially any other code which may not handle EINTR properly). One extra benefit is it also helps stray workers notice a rare, unexpected master death more easily. Workers continue to (and will always) accept existing signals for compatibility with tools/scripts which may signal workers.
  • PID file are always written early (even on upgrade) again to avoid breaking strange monitoring setups which use PID files. Keep in mind we have always discouraged monitoring based on PID files as they are fragile.
  • We now avoid bubbling IOError to the Rack app on premature client disconnects when streaming the input body. This is usually not a problem with nginx, but may be on some LAN setups without nginx).
  • GNUmakefile: add "check" target for running all tests. "check" rolls off the fingers of users familiar with GNU Automake more easily. The "test-all" target is preserved for compatibility.

New in Unicorn 4.7.0 (Nov 5, 2013)

  • support SO_REUSEPORT on new listeners (:reuseport)
  • unicorn is now GPLv2-or-later and Ruby 1.8-licensed (instead of GPLv2-only, GPLv3-only, and Ruby 1.8-licensed)
  • USR2 redirects fixed for Ruby 1.8.6 (broken since 4.1.0)
  • unicorn(1) and unicorn_rails(1) enforces valid integer for -p/--port
  • attempt to rename PID file when possible (on USR2)
  • workaround reopen atomicity issues for stdio vs non-stdio
  • improve handling of client-triggerable socket errors

New in Unicorn 4.6.3 (Jun 21, 2013)

  • Fix --no-default-middleware option.

New in Unicorn 4.6.2 (Feb 26, 2013)

  • This release fixes a bug in Unicorn::HttpParser#filter_body which affected some configurations of Rainbows! There is also a minor size reduction in the DSO.

New in Unicorn 4.6.1 (Feb 21, 2013)

  • Unicorn::Const::UNICORN_VERSION is now auto-generated from GIT-VERSION-GEN and always correct. Minor cleanups for hijacking.

New in Unicorn 4.6.0 (Feb 7, 2013)

  • This pre-release adds hijacking support for Rack 1.5 users. See Rack documentation for more information about hijacking. There is also a new --no-default-middleware/-N option for the `unicorn' command to ignore RACK_ENV within unicorn thanks to Lin Jen-Shin.
  • There are only documentation and test-portability updates since 4.6.0pre1, no code changes.

New in Unicorn 4.5.0 (Dec 8, 2012)

  • The new check_client_connection option allows unicorn to detect most disconnected local clients before potentially expensive application processing begins. This feature is useful for applications experiencing spikes of traffic leading to undesirable queue times, as clients will disconnect (and perhaps even retry, compounding the problem) before unicorn can even start processing the request. To enable this feature, add the following line to a unicorn config file: check_client_connection true This feature only works when nginx (or any other HTTP/1.0+ client) is on the same machine as unicorn. A huge thanks to Tom Burns for implementing and testing this change in production with real traffic (including mitigating an unexpected DoS attack). ref: http://mid.gmane.org/CAK4qKG3rkfVYLyeqEqQyuNEh_nZ8yw0X_cwTxJfJ+TOU+y8F+w@mail.gmail.com
  • This release fixes broken Rainbows! compatibility in 4.5.0pre1.

New in Unicorn 4.4.0 (Oct 11, 2012)

  • Non-regular files are no longer reopened on SIGUSR1. This allows users to specify FIFOs as log destinations.
  • TCP_NOPUSH/TCP_CORK is no longer set/unset by default. Use :tcp_nopush explicitly with the "listen" directive if you wish to enable TCP_NOPUSH/TCP_CORK.
  • Listen sockets are now bound _after_ loading the application for preload_app(true) users. This prevents load balancers from sending traffic to an application server while the application is still loading.
  • There are also minor test suite cleanups.

New in Unicorn 4.3.1 (Apr 30, 2012)

  • Call shutdown(2) if a client EOFs on us during upload. We can avoid holding a socket open if the Rack app forked a process during uploads.
  • ignore potential Errno::ENOTCONN errors (from shutdown(2)). Even on LANs, connections can occasionally be accept()-ed but be unusable afterwards.

New in Unicorn 4.2.1 (Mar 27, 2012)

  • Stale pid files are detected if a pid is recycled by processes belonging to another user, thanks to Graham Bleach.
  • nginx example config updates thanks to to Eike Herzbach.
  • KNOWN_ISSUES now documents issues with apps/libs that install conflicting signal handlers.

New in Unicorn 4.2.0 (Jan 30, 2012)

  • The GPLv3 is now an option to the Unicorn license. The existing GPLv2 and Ruby-only terms will always remain options, but the GPLv3 is preferred.
  • Daemonization is correctly detected on all terminals for development use (Brian P O'Rourke).
  • Unicorn::OobGC respects applications that disable GC entirely during application dispatch (Yuichi Tateno).
  • Many test fixes for OpenBSD, which may help other *BSDs, too. (Jeremy Evans).
  • There is now _optional_ SSL support (via the "kgio-monkey" RubyGem). On fast, secure LANs, SSL is only intended for detecting data corruption that weak TCP checksums cannot detect. Our SSL support is remains unaudited by security experts.
  • There are also some minor bugfixes and documentation improvements.
  • Ruby 2.0.0dev also has a copy-on-write friendly GC which can save memory when combined with "preload_app true", so if you're in the mood, start testing Unicorn with the latest Ruby!

New in Unicorn 4.1.1 (Aug 26, 2011)

  • The last-resort timeout mechanism was inaccurate and often delayed in activation since the 2.0.0 release. It is now fixed and remains power-efficient in idle situations, especially with the wakeup reduction in MRI 1.9.3+.
  • There is also a new document on application timeouts intended to discourage the reliance on this last-resort mechanism. It is visible on the web at: http://unicorn.bogomips.org/Application_Timeouts.html

New in Unicorn 4.1.0 (Aug 22, 2011)

  • Rack::Chunked and Rack::ContentLength middlewares are loaded by default for RACK_ENV=(development|deployment) users to match Rack::Server behavior. As before, use RACK_ENV=none if you want fine-grained control of your middleware. This should also help users of Rainbows! and Zbatery.
  • CTL characters are now rejected from HTTP header values.
  • Exception messages are now filtered for [:cntrl:] characters since application/middleware authors may forget to do so * Workers will now terminate properly if a SIGQUIT/SIGTERM/SIGINT is received while during worker process initialization.
  • close-on-exec is explicitly disabled to future-proof against Ruby 2.0 changes [ruby-core:38140]

New in Unicorn 4.0.1 (Jun 30, 2011)

  • This release fixes things for users of per-worker "listen" directives in the after_fork hook.
  • The "timeout" configurator directive is now truncated to 0x7ffffffe seconds to prevent overflow when calling IO.select.

New in Unicorn 4.0.0 (Jun 27, 2011)

  • A single Unicorn instance may manage more than 1024 workers without needing privileges to modify resource limits. As a result of this, the "raindrops"[1] gem/library is now a required dependency.
  • TCP socket defaults now favor low latency to mimic UNIX domain socket behavior (tcp_nodelay: true, tcp_nopush: false). This hurts throughput, users who want to favor throughput should specify "tcp_nodelay: false, tcp_nopush: true" in the listen directive.
  • Error logging is more consistent and all lines should be formatted correctly in backtraces. This may break the behavior of some log parsers.
  • The call stack is smaller and thus easier to examine backtraces when debugging Rack applications.
  • There are some internal API changes and cleanups, but none that affect applications designed for Rack. See "git log v3.7.0.." for details.
  • For users who cannot install kgio[2] or raindrops, Unicorn 1.1.x remains supported indefinitely. Unicorn 3.x will remain supported if there is demand. We expect raindrops to introduce fewer portability problems than kgio did, however.

New in Unicorn 3.7.0 (Jun 10, 2011)

  • minor feature update:
  • miscellaneous documentation improvements
  • return 414 (instead of 400) for Request-URI Too Long
  • strip leading and trailing linear whitespace in header values
  • User-visible improvements:
  • meant for Rainbows! users:

New in Unicorn 3.6.1 (Apr 27, 2011)

  • Our attempt in 3.6.0 to workaround a problem with the OpenSSL PRNG actually made the problem worse. This release corrects the workaround to properly reseed the OpenSSL PRNG after forking.

New in Unicorn 3.6.0 (Apr 21, 2011)

  • This version includes workarounds for fork() issues with the pseudo-random number generators shipped with Ruby and robustness improvements for log reopening.

New in Unicorn 3.4.0 (Feb 8, 2011)

  • IPv6 support in the HTTP hostname parser and configuration language. Configurator syntax for "listen" addresses should be the same as nginx. Even though we support IPv6, we will never support non-LAN/localhost clients connecting to Unicorn.
  • TCP_NOPUSH/TCP_CORK is enabled by default to optimize for bandwidth usage and avoid unnecessary wakeups in nginx.
  • Updated KNOWN_ISSUES document for bugs in recent Ruby 1.8.7 (RNG needs reset after fork) and nginx+sendfile()+FreeBSD 8.
  • examples/nginx.conf updated for modern stable versions of nginx.
  • "Status" in headers no longer ignored in the response, Rack::Lint already enforces this so we don't duplicate the work.
  • All tests pass under Ruby 1.9.3dev
  • various bugfixes in the (mostly unused) ExecCGI class that powers http://bogomips.org/unicorn.git

New in Unicorn 3.3.0 (Jan 6, 2011)

  • Certain applications that already serve hundreds/thousands of requests a second should experience performance improvements due to Time.now.httpdate usage being removed and reimplemented in C.
  • There are also minor internal changes and cleanups for Rainbows!

New in Unicorn 3.2.1 (Dec 27, 2010)

  • There are numerous improvements in the HTTP parser for Rainbows!, none of which affect Unicorn-only users.
  • The kgio dependency is incremented to 2.1: this should avoid ENOSYS errors for folks building binaries on newer Linux kernels and then deploying to older ones.
  • There are also minor documentation improvements, the website is now JavaScript-free!

New in Unicorn 3.1.0 (Dec 10, 2010)

  • This release enables tuning the client_buffer_body_size to raise or lower the threshold for buffering request bodies to disk. This only applies to users who have not disabled rewindable input. There is also a TeeInput bugfix for uncommon usage patterns and Configurator examples in the FAQ should be fixed.

New in Unicorn 3.0.1 (Dec 3, 2010)

  • One bugfix for Rainbows! ...and only Rainbows! This release fixes HTTP pipelining for requests with bodies for users of synchronous Rainbows! concurrency models.
  • Since Unicorn itself does not support keepalive nor pipelining, Unicorn-only users need not upgrade.

New in Unicorn 3.0.0 (Nov 22, 2010)

  • This release updates us to the Kgio 2.x series which should play more nicely with other applications. There are also bugfixes from the 2.0.1 release and a small bugfix to the new StreamInput class.
  • The Unicorn 3.x series will supercede the 2.x series while the 1.x series will remain supported indefinitely.

New in Unicorn 2.0.1 (Nov 18, 2010)

  • An error handling problems than caused certain errors to not be logged nor responded to correctly has been fixed.
  • A race condition in reload and HttpParserError constant resolution were fixed.
  • A parser error test from Rainbows was added.

New in Unicorn 2.0.0 (Oct 28, 2010)

  • This version mostly features internal cleanups in preparation for future versions.
  • User visible changes include reductions in CPU wakeups on idle sites using high timeouts.
  • Barring possible portability issues due to the introduction of the kgio library, this release should be ready for all to use, though 1.1.x (and possibly 1.0.x) versions will continue to be maintained.

New in Unicorn 1.1.4 (Oct 5, 2010)

  • We no longer unlinking actively listening sockets upon startup (but continue to unlink dead ones). This bug could trigger downtime and nginx failures if a user makes an error and attempts to start Unicorn while it is already running. Thanks to Jordan Ritter for the detailed bug report leading to this fix.
  • There are also minor documentation and test updates pulled in from master. This is hopefully the last bugfix release of the 1.1.x series.

New in Unicorn 1.1.3 (Aug 30, 2010)

  • This release fixes race conditions during SIGUSR1 log cycling. This bug mainly affects Rainbows! users serving static files, but some Rack apps use threads internally even under Unicorn.

New in Unicorn 1.1.1 (Jul 11, 2010)

  • Unicorn::TeeInput constant resolution for Unicorn::ClientError was broken while simplifying the code for RDoc. This affects users of Rainbows! and Zbatery.

New in Unicorn 1.1.0 (Jul 8, 2010)

  • This is a small, incremental feature release with some internal changes to better support upcoming versions of the Rainbows! and Zbatery Web servers.
  • There is no need to upgrade, but also little danger in doing so.
  • There was one pedantic bugfix which shouldn't affect anyone and some small documentation updates.

New in Unicorn 0.991.0 (Jun 11, 2010)

  • The "working_directory" configuration parameter is now handled before config.ru. That means "unicorn" and "unicorn_rails" no longer fail when initially started outside of the configured "working_directory" where a config.ru is required. Rails 3 (beta) support should be improved, too.

New in Unicorn 0.990.0 (Jun 8, 2010)

  • This release fixes a bug in the HTTP parser triggered by rare bots sending the "Version" header.
  • Horizontal tabs are also allowed as leading whitespace.
  • The "logger" configuration no longer requires a "close" method.
  • There's a new OobGC middleware which forces the GC to run when not servicing clients.
  • The out-of-the-box Rails3 experience was improved with "unicorn_rails" (though the "unicorn" command is still recommended).

New in Unicorn 0.93.4 (Oct 27, 2009)

  • This release works around BSD stdio compatibility issues that affect FreeBSD and Mac OS X systems using Ruby 1.8. This issue does not affect Ruby 1.9 users.
  • Additionally there are small documentation updates, one error handling improvement, and one minor change that should improve the reliability of signal delivery.

New in Unicorn 0.93.3 (Oct 10, 2009)

  • This release fixes compatibility with OpenBSD (and possibly other Unices with stricter fchmod(2) implementations) thanks to Jeremy Evans. Additionally there are small documentation changes all around.

New in Unicorn 0.93.2 (Oct 8, 2009)

  • Truncated POST bodies from URL-encoded forms in Rails are avoided by switching TeeInput to use read-in-full semantics (only) when a Content-Length: header exists.
  • Chunked request bodies continue to exhibit readpartial semantics to support simultaneous bidirectional chunking.

New in Unicorn 0.93.1 (Oct 5, 2009)

  • Permissions for release tarballs/gems were fixed.

New in Unicorn 0.91.0 (Sep 5, 2009)

  • 18 years too late, Unicorn finally gets HTTP/0.9 support as HTTP was implemented in 1991.

New in Unicorn 0.90.0 (Aug 17, 2009)

  • README: update version numbers for website Update Rails tests to run on Rails 2.3.3.1 README: latest stable version is 0.8.4 unicorn_http: small cleanups and size reduction Remove Ragel-generated file from version control unicorn_http: remove typedef from http_parser unicorn_http: update copyright unicorn_http: change "global_" prefix to "g_" unicorn_http: add helpful macros extconf: SIZEOF_OFF_T should be a ruby.h macro Refactoring unicorn_http C/Ragel code http: find_common_field_value => find_common_field http: split uncommon_field into a separate function http: remove some redundant functions http: "hp" denotes http_parser structs for consistency http: small cleanup in "https" detection http: minor cleanup of http_field handling http: split out server params handling http: move global initialization code http: cleanup setting for common values => globals http: remove noise functions http: move non-Ruby-specific macros c_util.h http: prepare http_parser struct for body processing http: generic C string vs VALUEs comparison function http: process Content-Length and Transfer-Encoding http: preliminary chunk decoding test_upload: extra CRLF is needed Switch to Ragel/C-based chunk/trailer parser http: unit tests for overflow and bad lengths http: add test for invalid trailer http: join repeated headers with a comma test_util: explicitly close tempfiles for GC-safety test_exec: wait for worker readiness Documentation updates test_signals: unlink log files of KILL-ed process http: rename read_body to filter_body http: add CONST_MEM_EQ macro http: add "HttpParser#keepalive?" method http: freeze fields when creating them, always README: everybody loves Ruby DSLs http_request: reinstate empty StringIO optimization tee_input: make interface more usable outside of Unicorn Drop the micro benchmarks http: fix warning when sizeof(off_t) == sizeof(long long) GNUmakefile: Fix "install" target Fix documentation for Util.reopen_logs http_response: pass through unknown status codes const: remove unused constants update TODO http: support for "Connection: keep-alive" TODO: remove keep-alive/pipelining Make launchers __END__-aware Remove explicit requires for Rack things app/inetd: explicitly close pipe descriptors on CatBody#close

New in Unicorn 0.8.4 (Aug 7, 2009)

  • This release allows graceful degradation in case a user is using a status code not defined by Rack::Utils::HTTP_STATUS_CODES. A patch has been submitted upstream to Rack but this issue may still affect users of yet-to-be-standardized status codes.

New in Unicorn 0.8.0 (May 27, 2009)

  • enforce Rack dependency, minor performance improvements and fixes

New in Unicorn 0.5.3 (Apr 17, 2009)

  • fix 100% CPU usage when idle, small cleanups