about summary refs log tree commit homepage
DateCommit message (Collapse)
2009-10-29unicorn 0.93.5 v0.93.5
This release fixes a regression introduced in 0.93.3 where timed-out worker processes run a chance of not being killed off at all if they're hung. While it's not ever advisable to have requests take a long time, we realize it's easy to fix everything :) Eric Wong (3): TODO: remove --kill fix reliability of timeout kills TODO: update for next version (possibly 1.0-pre)
2009-10-29TODO: update for next version (possibly 1.0-pre)
2009-10-29fix reliability of timeout kills
The method introduced in commit 6c8a3d3c55997978bacaecc5dbbb7d03c2fee345 to avoid killing workers after suspend/hibernate interacted badly with the change for OpenBSD fchmod(2) compatibility introduced with the 0.93.3 release. This interaction lead to workers with files stuck in the zero state to never be murdered off for timeout violations. Additionally, the method to avoid killing processes off was never completely reliable and has been reworked even if we entered suspend/hibernate/STOP during client processing. This regression was discovered during continued development of the Rainbows! test suite (which we will bring over as it becomes ready).
2009-10-29TODO: remove --kill
I'm still having a hard time justifying this...
2009-10-27unicorn 0.93.4 v0.93.4
This release mainly works around BSD stdio compatibility issues that affect at least FreeBSD and OS X. While this issues was documented and fixed in [ruby-core:26300][1], no production release of MRI 1.8 has it, and users typically upgrade MRI more slowly than gems. This issue does NOT affect 1.9 users. Thanks to Vadim Spivak for reporting and testing this issue and Andrey Stikheev for the fix. Additionally there are small documentation bits, one error handling improvement, and one minor change that should improve reliability of signal delivery. Andrey Stikheev (1): workaround FreeBSD/OSX IO bug for large uploads Eric Wong (7): DESIGN: address concerns about on-demand and thundering herd README: alter reply conventions for the mailing list configurator: stop testing for non-portable listens KNOWN_ISSUES: document Rack gem issue w/Rails 2.3.2 stop continually resends signals during shutdowns add news bodies to site NEWS.atom.xml configurator: fix broken example in RDoc Suraj N. Kurapati (1): show configuration file path in errors instead of '(eval)' [1] http://redmine.ruby-lang.org/issues/show/2267
2009-10-25workaround FreeBSD/OSX IO bug for large uploads
Under FreeBSD writing to the file in sync mode does not change current position, so change position to the end of the file. Without this patch multipart post requests with large data (image uploading) does not work correctly: Status: 500 Internal Server Error bad content body /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/utils.rb:347:in `parse_multipart' /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/utils.rb:319:in `loop' /usr/local/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/utils.rb:319:in `parse_multipart' File position behavior under FreeBSD : ruby -v ruby 1.8.7 (2009-04-08 patchlevel 160) [i386-freebsd7] irb(main):001:0> b = File.new("abc", "w+") => #<File:abc> irb(main):002:0> b.sync = true => true irb(main):004:0> b.write("abc") => 3 irb(main):005:0> b.pos => 0 Acked-by: Eric Wong <normalperson@yhbt.net>
2009-10-24configurator: fix broken example in RDoc
Thanks to Greg Melton for reporting.
2009-10-20add news bodies to site NEWS.atom.xml
While we're at it, remove trailing whitespace for author names, too.
2009-10-18stop continually resends signals during shutdowns
Since our :QUIT and :TERM signal handlers are idempotent, we can safely retry sending signals in case workers don't/can't handle them them the first time around. This appears to be a problem with the Thread-based concurrency models in Rainbows! not behaving well (no surprise, though, since pthreads and signals are difficult to manage/mix properly).
2009-10-16KNOWN_ISSUES: document Rack gem issue w/Rails 2.3.2
In short: upgrade to Rails 2.3.4 (or later) ref: http://mid.gmane.org/20091014221552.GA30624@dcvr.yhbt.net Note: the workaround described in the article above only made the issue more subtle and we didn't notice them immediately.
2009-10-13show configuration file path in errors instead of '(eval)'
also __FILE__ did not reflect configuration file path
2009-10-13configurator: stop testing for non-portable listens
IPv4 addresses in the format of: "^[[:digit:]]+:[[:digit:]]+$" isn't very portable..
2009-10-12README: alter reply conventions for the mailing list
Mailman is now configured to munge Reply-To: to point back to the mailing list. This might make things easier for folks on low traffic mailing lists like ours.
2009-10-10DESIGN: address concerns about on-demand and thundering herd
Based on a private email I just received.
2009-10-09unicorn 0.93.3 v0.93.3
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. Eric Wong (11): doc: expand on the SELF_PIPE description fchmod heartbeat flips between 0/1 for compatibility examples/init.sh: remove "set -u" configurator: update with nginx fail_timeout=0 example PHILOSOPHY: clarify experience other deployments PHILOSOPHY: plug the Rainbows! spin-off project README: remove unnecessary and extraneous dash DESIGN: clarification and possibly improve HTML validity README: remove the "non-existent" part README: emphasize the "fast clients"-only part drop the whitespace cleaner for Ragel->C
2009-10-09drop the whitespace cleaner for Ragel->C
Generated C code is no longer checked into git so it doesn't matter.
2009-10-09README: emphasize the "fast clients"-only part
While Unicorn is one of very many Unix-only, pre-forking, shared socket servers in existence, and Unicorn is _definitely_ not the only server that only works *well* with fast clients, either. But as far as we know, Unicorn is the first (and so far only) server that emphasizes only working well with fast clients.
2009-10-09README: remove the "non-existent" part
Still pretty rare, though.
2009-10-09DESIGN: clarification and possibly improve HTML validity
It's "Ragel+C" (as well as being Ragel->C) because there is C code in the parser. Oddly, validator.w3.org doesn't complain about the unescaped ">", but we'll err on the safe side for blissful ignorance.
2009-10-09README: remove unnecessary and extraneous dash
2009-10-09PHILOSOPHY: plug the Rainbows! spin-off project
2009-10-09PHILOSOPHY: clarify experience other deployments
I've only served in an advisory role in most of those instances and I relied on feedback from other folks (especially for Tomcat since I know almost nothing about that).
2009-10-09configurator: update with nginx fail_timeout=0 example
It has come to our attention that this setting is not very well-known to the rest of the world...
2009-10-09examples/init.sh: remove "set -u"
It's too simple of a script and causes running the init script with zero arguments to fail instead of printing out the usage message.
2009-10-08fchmod heartbeat flips between 0/1 for compatibility
This removes the Time.now.to_i comparison that was used to avoid multiple, no-op fchmod() syscalls[1] within the same second. This should allow us to run on OpenBSD where it can raise EINVAL when Time.now.to_i is passed to it. Reported-by: Jeremy Evans <jeremyevans0@gmail.com> [1] - gettimeofday() from Time.now is not a real syscall on VDSO-enabled x86_64 GNU/Linux systems where Unicorn is primarily developed.
2009-10-07doc: expand on the SELF_PIPE description
There seems to be a small amount of confusion regarding how it's used (and some of the code is not very obvious). So explain our usage of it and distinguish its use in the master vs worker(s).
2009-10-07unicorn 0.93.2 v0.93.2
Avoid truncated POST bodies from with URL-encoded forms in Rails 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. The lack of return value checking in Rails to protect against a short ios.read(length) is entirely reasonable even if not pedantically correct. Most ios.read(length) implementations return the full amount requested except right before EOF. Also there are some minor documentation improvements. Eric Wong (7): Fix NEWS generation on single-paragraph tag messages Include GPLv2 in docs doc: make it clear contributors retain copyrights TODO: removed Rainbows! (see rainbows.rubyforge.org) Document the START_CTX hash contents more-compatible TeeInput#read for POSTs with Content-Length tests for read-in-full vs readpartial semantics
2009-10-07tests for read-in-full vs readpartial semantics
We modified TeeInput to have read-in-full semantics in most situations to suit existing apps and libraries (like Rails) that don't check for and handle partial reads correctly. The read-in-full semantics are needed by Rails because of this: https://rails.lighthouseapp.com/projects/8994/tickets/3343
2009-10-06more-compatible TeeInput#read for POSTs with Content-Length
There are existing applications and libraries that don't check the return value of env['rack.input'].read(length) (like Rails :x). Those applications became broken under the IO#readpartial semantics of TeeInput#read when handling larger request bodies. We'll preserve the IO#readpartial semantics _only_ when handling chunked requests (as long as Rack allows it, it's useful for real-time processing of audio/video streaming uploads, especially with Rainbows! and mobile clients) but use read-in-full semantics for TeeInput#read on requests with a known Content-Length.
2009-10-05Document the START_CTX hash contents
Modifying this can be useful for esoteric cases like switching entire Ruby installations or if the app was originally started in a no-longer-existent directory and we can't upgrade because we can't chdir to it.
2009-10-05TODO: removed Rainbows! (see rainbows.rubyforge.org)
Rainbows! is more ambitious and a separate project now.
2009-10-05doc: make it clear contributors retain copyrights
We hope to never require copyright assignment here...
2009-10-05Include GPLv2 in docs
Even though we don't RDoc it, our RDoc still links to it.
2009-10-02Fix NEWS generation on single-paragraph tag messages
2009-10-02unicorn 0.93.1 v0.93.1
Fix permissions for release tarballs/gems, no other changes. Thanks to Jay Reitz for reporting this.
2009-10-02verify liberal file permissions when packaging
Prevent non-umask 0022 shells from generating releases. Thanks for Jay Reitz for spotting this and reporting promptly to me; all of my Ruby and gem installations are done as a regular user so I never would've noticed.
2009-10-02unicorn 0.93.0 v0.93.0
The one minor bugfix is only for Rails 2.3.x+ users who set the RAILS_RELATIVE_URL_ROOT environment variable in a config file. Users of the "--path" switch or those who set the environment variable in the shell were unaffected by this bug. Note that we still don't have relative URL root support for Rails < 2.3, and are unlikely to bother with it unless there is visible demand for it. New features includes support for :tries and :delay when specifying a "listen" in an after_fork hook. This was inspired by Chris Wanstrath's example of binding per-worker listen sockets in a loop while migrating (or upgrading) Unicorn. Setting a negative value for :tries means we'll retry the listen indefinitely until the socket becomes available. So you can do something like this in an after_fork hook: after_fork do |server, worker| addr = "127.0.0.1:#{9293 + worker.nr}" server.listen(addr, :tries => -1, :delay => 5) end There's also the usual round of added documentation, packaging fixes, code cleanups, small fixes and minor performance improvements that are viewable in the "git log" output. Eric Wong (54): build: hardcode the canonical git URL build: manifest dropped manpages build: smaller ChangeLog doc/LATEST: remove trailing newline http: don't force -fPIC if it can't be used .gitignore on *.rbc files Rubinius generates README/gemspec: a better description, hopefully GNUmakefile: add missing .manifest dep on test installs Add HACKING document configurator: fix user switch example in RDoc local.mk.sample: time and perms enforcement unicorn_rails: show "RAILS_ENV" in help message gemspec: compatibility with older Rubygems Split out KNOWN_ISSUES document KNOWN_ISSUES: add notes about the "isolate" gem gemspec: fix test_files regexp match gemspec: remove tests that fork from test_files test_signals: ensure we can parse pids in response GNUmakefile: cleanup test/manifest generation util: remove APPEND_FLAGS constant http_request: simplify and remove handle_body method http_response: simplify and remove const dependencies local.mk.sample: fix .js times TUNING: notes about benchmarking a high :backlog HttpServer#listen accepts :tries and :delay parameters "make install" avoids installing multiple .so objects Use Configurator#expand_addr in HttpServer#listen configurator: move initialization stuff to #initialize Remove "Z" constant for binary strings cgi_wrapper: don't warn about stdoutput usage cgi_wrapper: simplify status handling in response cgi_wrapper: use Array#concat instead of += server: correctly unset reexec_pid on child death configurator: update and modernize examples configurator: add colons in front of listen() options configurator: remove DEFAULT_LOGGER constant gemspec: clarify commented-out licenses section Add makefile targets for non-release installs cleanup: use question mark op for 1-byte comparisons RDoc for Unicorn::HttpServer::Worker small cleanup to pid file handling + documentation rails: RAILS_RELATIVE_URL_ROOT may be set in Unicorn config unicorn_rails: undeprecate --path switch manpages: document environment variables README: remove reference to different versions Avoid a small window when a pid file can be empty configurator: update some migration examples configurator: listen :delay must be Numeric test: don't rely on .manifest for test install SIGNALS: state that we stole semantics from nginx const: DEFAULT_PORT as a string doesn't make sense test_helper: unused_port rejects 8080 unconditionally GNUmakefile: SINCE variable may be unset tests: GIT-VERSION-GEN is a test install dependency
2009-10-02tests: GIT-VERSION-GEN is a test install dependency
2009-10-02GNUmakefile: SINCE variable may be unset
Makes it easier for new projects with no tags yet to reuse this snippet.
2009-10-02test_helper: unused_port rejects 8080 unconditionally
Checking for addr to match the DEFAULT_HOST constant is wrong since having only 127.0.0.1:8080 will still prevent 0.0.0.0:8080 from being bound.
2009-10-02const: DEFAULT_PORT as a string doesn't make sense
TCP ports are always integers, and it was always allowing a randomly-generated value of 8080 through in the unused_port method of test_helper.
2009-10-02SIGNALS: state that we stole semantics from nginx
2009-10-02test: don't rely on .manifest for test install
This lets us run tests out-of-the-box on fresh checkouts and minimizes the overhead needed for creating/updating the test installs.
2009-10-02configurator: listen :delay must be Numeric
:delay may be a Float to represent fractional seconds.
2009-10-02configurator: update some migration examples
We now give an example of how a before_fork hook can be used to incrementally migrate off the old code base without hitting a thundering herd (especially in the "preload_app false") case. Also comment on the per-worker listen usage in the RDoc, not just a hidden comment.
2009-10-01Avoid a small window when a pid file can be empty
There's always been a small window of opportunity for a script to do File.read(pid).to_i would cause File.read() to read an empty file and return "". This closes that window while hopefully retaining backwards compatibility... We've always checked for dirname(pid) writability in Configurator, so we can safely write to a temporary file in the intended directory and then atomically rename() it to the destination path.
2009-10-01README: remove reference to different versions
The >= 0.90.x series has been working out pretty well so far with only a few minor bug fixes in between, so it'll be less confusing.
2009-09-30manpages: document environment variables
Mostly for `unicorn_rails`, but TMPDIR is universal.
2009-09-30unicorn_rails: undeprecate --path switch
..but keep -P deprecated. --path is still useful for testing ad-hoc changes when you don't want to commit your changes permanently to a configuration file.
2009-09-30rails: RAILS_RELATIVE_URL_ROOT may be set in Unicorn config
Since Unicorn config files are written in Ruby, setting RAILS_RELATIVE_URL_ROOT should be possible (and even encouraged) in the config file if it is done at all.