about summary refs log tree commit homepage
DateCommit message (Collapse)
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.
2009-09-30small cleanup to pid file handling + documentation
It's pointless to try and stat a file before trying to read it. Instead just try opening it and rescue ENOENT because it would've been racy anyways. Additionally add some comments to keep us from forgetting why we did the things we did with the pid file management.
2009-09-30RDoc for Unicorn::HttpServer::Worker
I'd rather document and maintain a stable interface for the Worker class than to have to deal with potential (portability and security) issues with with supporting user privilege management right now. There's already an example of user/group-switching support in the after_fork() hook and the error handling involved may be different depending on the application and environment so I remain hesitant to add official support for it...
2009-09-30cleanup: use question mark op for 1-byte comparisons
It's compatible with both Ruby 1.8 and 1.9 without needing a Range object.
2009-09-30Add makefile targets for non-release installs
This should make it easier to test and run unreleased versions.
2009-09-28gemspec: clarify commented-out licenses section
It may have caused confusion that the licenses we're under were incompatible with older Rubygems which is not the case.
2009-09-28configurator: remove DEFAULT_LOGGER constant
We no longer have external lookups for it so just stick it in the DEFAULTS hash for now. Since the Configurator::DEFAULTS hash can be considered a stable interface for other modules to interact with, they can eventually just use it instead of relying on another constant.
2009-09-28configurator: add colons in front of listen() options
Hopefuly make it more obvious that they're Ruby symbols and not strings. While we're at it, fix ordering of :{rcv,snd}buf descriptions to (logically) match the order of mention.
2009-09-28configurator: update and modernize examples
* Use the new :tries and :default parameters for listen() instead of the ugly and less-effective "rescue nil" * ActiveRecord connection management examples for hooks when using for "preload_app true" * combine "preload_app true" example with REE COW-friendly optimization for memory savings Some of these are based on Chris Wanstrath's configuration posted here: http://gist.github.com/189623
2009-09-27server: correctly unset reexec_pid on child death
Sometimes the upgraded version won't survive and we can fail to unset that pid and instead accidentally create a local variable. This is unlikely to be a problem in practice because this variable is immediately reclobbered when we fork.
2009-09-27cgi_wrapper: use Array#concat instead of +=
Array#concat avoids an intermediate Array object from being allocated (yes, still supporting Rails <= 1.2.x apps...)
2009-09-27cgi_wrapper: simplify status handling in response
Our HttpResponse class interprets non-Integer string status now as well as falling back if it can't be looked up.
2009-09-27cgi_wrapper: don't warn about stdoutput usage
It really shouldn't be a problem for existing CGI apps to write to the StringIO object..
2009-09-27Remove "Z" constant for binary strings
We've started using magic comments to ensure any strings we create are binary instead. Additionally, ensure we create any StringIO objects with an explicit string (which default to binary) to ensure the StringIO object is binary. This is because StringIO.new (with no arguments) will always use the process-wide default encoding since it does not know about magic comments (and couldn't, really...)
2009-09-27configurator: move initialization stuff to #initialize
Avoids making the #listen method any noisier than it should be.
2009-09-27Use Configurator#expand_addr in HttpServer#listen
This may be redundant for the "normal" configuration file directive, but allows the same syntax to be used in after_fork hooks where HttpServer#listen() may be called.
2009-09-27"make install" avoids installing multiple .so objects
Sometimes we test with unicorn_http.so in lib, but that gets mistakenly picked up by setup.rb and can wreak havoc for on upgrades if ABIs change.
2009-09-27HttpServer#listen accepts :tries and :delay parameters
This allows per-worker listeners to be configured to retry and and not continue until the equivalent worker belonging to a previous master (or even another server) has released the socket. In the Configurator RDoc, include better examples for per-worker server.listen calls using these :tries == -1. Inspired by an example by Chris Wanstrath.
2009-09-27TUNING: notes about benchmarking a high :backlog
Based on the experiences of Tom Preston-Werner: http://thread.gmane.org/gmane.comp.lang.ruby.unicorn.general/24/focus=28
2009-09-27local.mk.sample: fix .js times
Also make files easier to overwrite while we're at it
2009-09-27http_response: simplify and remove const dependencies
We don't need the Z constant anymore and inlining the header writing gives a small overall performance improvement in microbenchmarks. This also makes this method reentrant and thread-safe for Rainbows as well.
2009-09-27http_request: simplify and remove handle_body method
It is simpler and even slightly faster in micro benchmarks when inlined.
2009-09-27util: remove APPEND_FLAGS constant
One less thing to RDoc
2009-09-27GNUmakefile: cleanup test/manifest generation
The .manifest dependencies were causing unnecessarily copies for the tests to run.
2009-09-27test_signals: ensure we can parse pids in response
We don't want to accidentally kill every process in the process group.
2009-09-27gemspec: remove tests that fork from test_files
This allows `gem check -t unicorn` to work. The rest of the tests run with GNU make but I don't have the patience to get them working with pure-Ruby since I can't stand running those tests sequentially anyways.
2009-09-27gemspec: fix test_files regexp match
Not sure if anybody runs tests with Rubygems directly (instead of unpacking the source tree, but it's there)
2009-09-24KNOWN_ISSUES: add notes about the "isolate" gem
This issue is still being looked at, but hopefully this note can help folks if they run into this.
2009-09-24Split out KNOWN_ISSUES document
This deserves to be a separate document and easier to find/edit.
2009-09-24gemspec: compatibility with older Rubygems
"licenses=" is not in older Rubygems and some organizations are still stuck on those...
2009-09-24unicorn_rails: show "RAILS_ENV" in help message
This matches the manpage and the rest of the documentation.
2009-09-22local.mk.sample: time and perms enforcement
2009-09-22configurator: fix user switch example in RDoc
We changed this in 97e469fc3afb751618b8b9a7b364cb447aaf90dd but never updated the example.
2009-09-19Add HACKING document
2009-09-18GNUmakefile: add missing .manifest dep on test installs
Now tests run after a clean checkout (as long as rack libraries are in $LOAD_PATH, probably via RUBYLIB).
2009-09-18README/gemspec: a better description, hopefully
2009-09-18.gitignore on *.rbc files Rubinius generates
2009-09-18http: don't force -fPIC if it can't be used
Not everybody can use it, even if most of the world can.