about summary refs log tree commit homepage
DateCommit message (Collapse)
2012-01-28unicorn 4.2.0 v4.2.0
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!
2012-01-28doc: update doc for Ruby 2.0.0dev CoW-friendliness
Ruby 2.0.0dev is the future and includes a CoW-friendly GC, so we shall encourage folks to give Ruby 2.0.0dev a spin.
2012-01-27script/isolate_for_tests: disable sqlite3-ruby for Ruby 2.0.0dev
We don't need it because we don't test old Rails with bleeding edge Ruby.
2012-01-27disable old Rails tests for Ruby 2.0.0
I doubt anybody would attempt to run ancient, unsupported versions of Rails on the latest (unreleased, even) versions of Ruby...
2012-01-27script/isolate_for_tests: update to kgio 2.7.2
Again, we test with the latest version.
2012-01-24update tests for Rack 1.4.1
Trying to ensure things always work with the latest version.
2012-01-08Rakefile: swap freshmeat.net URL for freecode.com
:<
2011-12-28update tests for rack 1.4.0
It's the latest and greatest version, so ensure everything works with it.
2011-12-17http: test case for "Connection: TE"
We need to be sure we don't barf on this header.
2011-12-13cleanup exception handling on SIGUSR1
No need to duplicate logic here
2011-12-13quiet possible IOError from SIGUSR1 (reopen logs)
It's possible for a SIGUSR1 signal to be received in the worker immediately before calling IO.select. In that case, do not clutter logging with IOError and just process the reopen log request.
2011-12-05socket_helper: fix grammerr fail
Oops :x
2011-12-05socket_helper: set SO_KEEPALIVE on TCP sockets
Even LANs can break or be unreliable sometimes and socket disconnect messages get lost, which means we fall back to the global (kill -9) timeout in Unicorn. While the default global timeout is much shorter (60s) than typical TCP timeouts, some HTTP application dispatches take much I/O or computational time (streaming many gigabytes), so the global timeout becomes ineffective. Under Linux, sysadmins are encouraged to lower the default net.ipv4.tcp_keepalive_* knobs in sysctl. There should be similar knobs in other operating systems (the default keepalive intervals are usually ridiculously high, too high for anything). When the listen socket has SO_KEEPALIVE set, the flag should be inherited by accept()-ed sockets.
2011-12-05socket_helper: remove out-of-date comment for TCP_NODELAY
We favor low latency and consistency with the Unix socket behavior even with TCP.
2011-12-05bump dependencies
We should always be testing with the newest available versions to watch for incompatibilities, even if we don't /require/ the latest ones to run.
2011-11-15tests: try to set a shorter path for Unix domain sockets
We're only allowed 108 bytes for Unix domain sockets. mktemp(1) usually generates path names of reasonable length and we rely on it anyways.
2011-11-15tests: just use the sha1sum implemented in Ruby
The output of SHA1 command-line tools is too unstable and I'm more comfortable with Ruby 1.9 encoding support than I was in 2009. Jeremy Evans noted the output of "openssl sha1" has changed since I last used it.
2011-11-15test_helper: ensure test client connects to valid address
You can listen on 0.0.0.0, but trying to connect to it doesn't work well on OpenBSD. Acked-by: Eric Wong <normalperson@yhbt.net>
2011-11-15t0011: fix test under OpenBSD
expr on OpenBSD uses a basic regular expression (according to re_format(7)), which doesn't support +, only *. Acked-by: Eric Wong <normalperson@yhbt.net>
2011-11-15configurator: limit timeout to 30 days
There's no practical difference between a timeout of 30 days and 68 years from an HTTP server standpoint. POSIX limits us to 31 days, actually, but there could be rounding error with floats used in Ruby time calculations and there's no real difference between 30 and 31 days, either... Thanks to Jeremy Evans for pointing out large values will throw EINVAL (on select(2) under OpenBSD with Ruby 1.9.3 and RangeError on older Rubies.
2011-11-15t: ensure SSL certificates exist on fresh test
We throw up some fake SSL certs for testing
2011-10-04OobGC: force GC.start
[ew: we need to explicitly enable GC if it is disabled and respect applications that disable GC] Acked-by: Eric Wong <normalperson@yhbt.net>
2011-09-15add preliminary SSL support
This will also be the foundation of SSL support in Rainbows! and Zbatery. Some users may also want to use this in Unicorn on LANs to meet certain security/auditing requirements. Of course, Nightmare! (in whatever form) should also be able to use it.
2011-09-14Detect daemonization via configuration.
This prevents the stopping of all workers by SIGWINCH if you're using a windowing system that will 'exec' unicorn from a process that's already in a process group. Acked-by: Eric Wong <normalperson@yhbt.net>
2011-09-09Links: add a link to the UnXF middleware
Since unicorn is designed to be deployed behind nginx (or similar), X-Forwarded-* headers are common and Rack applications may blindly trust spoofed X-Forwarded-* headers. UnXF provides a central place for managing that trust by using rpatricia.
2011-09-09http_server: update comment on tick == 0
The old comment was confusing. We only zero the tick counter when forking because application loading can take a long time. Otherwise, it's always updated. ref: http://mid.gmane.org/20110908191352.GA25251@dcvr.yhbt.net
2011-09-03http_server: a few more things eligible for GC in worker
There is no need to keep extra hashes or Proc objects around in the heap.
2011-08-29add GPLv3 option to the license
Existing license terms (Ruby-specific) and GPLv2 remain in place, but GPLv3 is preferred as it helps with distribution of AGPLv3 code and is explicitly compatible with Apache License (v2.0). Many more reasons are documented by the FSF: https://www.gnu.org/licenses/quick-guide-gplv3.html http://gplv3.fsf.org/rms-why.html ref: http://thread.gmane.org/gmane.comp.lang.ruby.unicorn.general/933
2011-08-25unicorn 4.1.1 - fix last-resort timeout accuracy v4.1.1
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
2011-08-24doc: add Application Timeouts document
Hopefully this leads to fewer worker processes being killed.
2011-08-23test_helper: remove needless LOAD_PATH mangling
We do it in the Ruby invocation or RUBYLIB.
2011-08-23fix sleep/timeout activation accuracy
I've noticed in stderr logs from some folks that (last resort) timeouts from the master process are taking too long to activate due to the workarounds for suspend/hibernation.
2011-08-22.document: re-add OobGC documentation
Oops!
2011-08-20unicorn 4.1.0 - small updates and fixes v4.1.0
* 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]
2011-08-20rdoc cleanups
2011-08-19close race if an exit signal hits the worker before trap
The signal handler from the master is still active and will push the pending signal to SIG_QUEUE if a worker receives a signal immediately after forking.
2011-08-19gemspec: bump wrongdoc dependency for dev
Hopefully it points people towards the mailing list
2011-08-19tests: bump test deps to the latest versions
Nothing appears broken :)
2011-08-19Rack::Chunked and ContentLength middlewares by default
This is needed to match the behavior of Rack::Server for RACK_ENV=(deployment|development), actually. This won't affect users of other RACK_ENV values. This change has minor performance consequences, so users negatively affected should set RACK_ENV to "none" instead for full control of their middleware stack. This mainly affects Rainbows!/Zbatery users since they have persistent connections and /need/ Content-Length or Transfer-Encoding:chunked headers.
2011-08-19filter exception messages with control characters
We do not want to affect terminals of users who view our log files.
2011-08-11http_server: small simplification for redirects
We only need the fileno in the key which we use to generate the UNICORN_FD env. Otherwise the IO object is accepted and understood by Ruby.
2011-08-11future-proof against close-on-exec by default
Setting the close-on-exec flag by default and closing non-standard descriptors is proposed for Ruby 1.9.4/2.0.0. Since Unicorn is one of the few apps to rely on FD inheritance across exec(), we need to workaround this by redirecting each listener FD to itself for Kernel#exec. Ruby supports a hash as the final argument to Kernel#exec since at least 1.9.1 (nobody cares for 1.9.0 anymore). This allows users to backport close-on-exec by default patches to older 1.9.x installs without breaking anything. ref: http://redmine.ruby-lang.org/issues/5041
2011-08-11test_socket_helper: Socket#bind may fail with EINVAL if IPv6 is missing
I don't build IPv6 into all my kernels; maybe other testers do not, either.
2011-08-03KNOWN_ISSUES: add link to FreeBSD jail workaround notes
Thanks to Tatsuya Ono on the unicorn mailing list.
2011-08-02trap death signals in the worker sooner
This helps close a race condition preventing shutdown if loading the application (preload_app=false) takes a long time and the user decides to kil workers instead.
2011-07-20http_server: explicitly disable close-on-exec for listeners
Future versions of Ruby may change this from the default *nix behavior, so we need to explicitly allow FD passing via exec(). ref: http://redmine.ruby-lang.org/issues/5041
2011-07-13http: reject non-LWS CTL chars (0..31 + 127) in field values
RFC 2616 doesn't appear to allow most CTL bytes even though Mongrel always did. Rack::Lint disallows 0..31, too, though we allow "\t" (HT, 09) since it's LWS and allowed by RFC 2616.
2011-07-01socket_helper: fix undefined variable for logging
I corrupted a Ruby build and SOL_TCP didn't get defined :x
2011-06-29unicorn 4.0.1 - regression bugfixes v4.0.1
This release fixes things for users of per-worker "listen" directives in the after_fork hook. Thanks to ghazel@gmail.com for reporting the bug. The "timeout" configurator directive is now truncated to 0x7ffffffe seconds to prevent overflow when calling IO.select.
2011-06-29configurator: limit timeout to 32-bit INT_MAX-1
Nobody will miss one second if they specify an "infinite" timeout of ~68 years. This prevents duplicating this logic in Rainbows!