about summary refs log tree commit homepage
DateCommit message (Collapse)
2009-03-25unicorn 0.2.3 v0.2.3
2009-03-25Ensure Tempfiles are unlinked after every request
Otherwise we bloat TMPDIR and run the host out of space, oops!
2009-03-25Don't bother unlinking UNIX sockets
Since we always unlink existing sockets when binding, there's no point in having code to unlink the sockets when we exit. Additionally, the old code path was racy.
2009-03-22unicorn 0.2.2 v0.2.2
2009-03-21Handle Rack multivalue headers correctly
Rack uses a single newline character to represent multi-value headers. Thus { 'Set-Cookie' => "foo=bar\nbar=foo" } will get you: Set-Cookie: foo=bar Set-Cookie: bar=foo While RFC2616 says you can combine headers as: Set-Cookie: foo=bar,bar=foo There are probably HTTP clients out there that don't handle things correctly so don't bother... Additionally, don't bother doing duplicate suppression anymore. Just assume Rack or a higher layer knows what it's doing regarding duplicates and we'll get a Hash most of the time anyways.
2009-03-21Simplify code for sleeping/waking up the master
Only sleep if our signal queue is empty. Remove redundant exception handling and go back to just consuming the entire pipe since that's more efficient if we're slammed with signals for whatever reason.
2009-03-21Rotate master logs before workers.
The master _may_ run with different user/group/umask than the workers. Since the logs were always created by the master process, the master should rotate them first to ensure correct ownership and permissions. This way if the workers fail log rotation and die, they'll be automatically respawned with the new logs in place.
2009-03-21HttpRequest: correctly reference logger
2009-03-21HttpRequest test so our requests pass Rack::Lint
This test requires Rack to be loaded and will not run without it. This also seems broken on 1.9 still with Rack 0.9.1...
2009-03-21http11: don't set headers Rack doesn't like
Fix the logic in HttpParser up front so we don't have to mess around with the following convoluted steps: 1. setting the HTTP_CONTENT_{LENGTH,TYPE} headers 2. reading the HTTP_CONTENT_{LENGTH,TYPE} headers again 3. setting the CONTENT_{LENGTH,TYPE} based on the HTTP_-prefixed one 4. deleting the HTTP_CONTENT_{LENGTH,TYPE} headers (since Rack doesn't like them) 1, 2, 3 were in the C code, 4 was in Ruby. Now the logic is: 1. if CONTENT_{LENGTH,TYPE} headers are seen, don't prefix with "HTTP_". All the branch logic for the new code is done at init time, too so there's no additional overhead in the HTTP parsing phase. There's also no additional overhead of hash lookups in the extra steps.
2009-03-21unicorn/http11: remove GATEWAY_INTERFACE
It's a CGI-ism and is not in the Rack spec, so don't bother.
2009-03-20unicorn_rails: remove unnecessary Rack-loading logic
Loading Rails (or at least config/environment) will already load its version of Rack, duh! This also prevents a double-require of Rack causing redefined Rack::VERSION errors.
2009-03-20documentation/disclaimer updates
I'm trying hard not to scare potential users away, maybe I'll hand out lollipops or something...
2009-03-20Process management cleanups
* Use waitpid2 to more reliably trap exit status * Stop including Process namespace since it leads to confusing conflicts.
2009-03-20Add Unicorn::App::ExecCgi
This is a Rack handler that passes Rack::Lint running cgit and so it has been lightly tested. No other CGI executables have been run with it.
2009-03-20HttpResponse: close body if it can close
The body could be an IO object that is closeable. So make sure we close it if it can be closed to avoid file descriptor leakage.
2009-03-19Remove Mongrel stuff from CHANGELOG
Even though we've forked off it, it's a different project and our version numbering starts off later.
2009-03-19Trap WINCH to QUIT children without respawning
This will only be enabled if we're daemonized and "real" WINCH signals cannot be generated by resizing the terminal. This is to avoid confusing developers who run in the foreground of a terminal. Additionally document procedures for reexecuting a running binary.
2009-03-19Move listen path and address expansion to Configurator
This fixes a bug where listener names in the master process would be incorrectly matched with the existing set; causing UNIX sockets to be unbound and rebound; breaking things for child processes. This is a better fit anyways since it's higher level.
2009-03-19unicorn_rails: fix standard pid path setup
This was broken in the last commit (d1ff8c5): start libifying common launcher code
2009-03-19start libifying common launcher code
The daemonization logic between unicorn and unicorn_rails scripts can definitely be shared. Again: our daemonization logic is slightly non-standard since our executables are designed to run in APP_ROOT/RAILS_ROOT and not "/" like "normal" UNIX daemons.
2009-03-18Fix link to Rubyforge releases page
2009-03-18unicorn v0.2.1, fix the Manifest v0.2.1
2009-03-18unicorn 0.2.0 v0.2.0
2009-03-18Documentation updates, prepare for 0.2.0
2009-03-18Add unicorn_rails script for Rails 2.3.2
This should just run inside RAILS_ROOT out-of-the-box. No config.ru is needed (but we'll use one if it's detected). This has slightly different semantics than script/server and the normal "unicorn" script (which has "rackup"-like) semantics. It tries to combine the best of both worlds, but do not consider the command-line option interface to be stable by any means.
2009-03-18Add signal queueing for test reliability
Although I didn't like the idea initially, signal queueing allows test_exec to run more reliably and the limited signal queue size will prevent scary queued signal behavior. Also, always wakeup the master immediately when CHLD is trapped to reduce the performance impact of SIGHUP-based config reloading. Combined with an extra check in test_exec, this should make test_exec run much more reliably than before.
2009-03-18gracefully die if working dir is invalid at fork
In nearly every app, if the current working directory disappears, the app becomes broken, sometimes subtly. It can be especially broken when preload_app is false (the default). So just shut ourselves down to spare ourselves the wasted CPU cycles on a dead app. As a (hopefully) pleasant side effect, this allows configurations with preload_app==false (the default) to do application code reloads via SIGHUP (in addition to unicorn config reloads).
2009-03-18tests: do not trust (our correct use of) 1.9 encodings
Despite reading numerous articles and inspecting the 1.9.1-p0 C source, I will never trust that we're always handling encoding-aware IO objects correctly. Thus this new test uses UNIX shell utilities that should always operate on files/sockets on a byte-level. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2009-03-17Allow binding to UNIX sockets relative to "~"
This is to be consistent with the existing "pid" and std{err,out}_path options which also take paths relative to "~"
2009-03-16Start _Known Issues_ section in README
Some other frameworks may also have code reloading issues. Since code reloading is mainly for development mode and Unicorn is capable of replacing the running executable without any dropping connections, broken code reloaders aren't worth fixing from our code...
2009-03-10HttpRequest: update comment regarding short writes v0.1.0
Or lack thereof on POSIX.
2009-03-10HttpRequest: set binmode on tempfiles
Just in case this stupid Ruby 1.9-ism creeps up on someone; I haven't been able to reproduce I/O corruption from the test cases, but better safe than sorry here.
2009-03-10http11: mark private methods as static
There's no point in increasing method visibility since it can cause conflicts with other libraries and reduces the inlining opportunities the compiler can make.
2009-03-10http11: remove unnecessary CPP definitions
2009-03-09update TODO
2009-03-09Remove sinatra example
It is no longer relevant (or working) with rackup compatibility.
2009-03-09Add -s/--server switch for compatibility with rackup
This allows config.ru files to be shared by rackup and unicorn without errors.
2009-03-09Documentation updates
Reformat README to avoid preformatted text. Document signal handling in SIGNALS. Split out DESIGN, it's probably not as useful to end-users Update CONTRIBUTORS LICENSE: copyright is for me (Eric Wong), not Zed since this is a Mongrel fork.
2009-03-09Configurator: document reasons for lowering backlog
2009-03-09test_exec: increase backlog to 128
Hopefully this increases test reliability
2009-03-09Revert "Remove -P/--pid switch from CLI"
This reverts commit 4414d9bf34f162a604d2aacc765ab1ca2fc90404.
2009-03-09Revert "exec: disable embedded switch parsing in config.ru"
This reverts commit e66ab79b8b5bc5311c750bf03868a7b2574f4ea1. Conflicts: bin/unicorn
2009-03-09Unicorn::Configurator: documentation
2009-03-09Remove COPYING, it is redundant with LICENSE
The LICENSE file is pretty much the same text, so there's no point in having both files other than making the licensing terms ambiguous. COPYING only specifies "GPL" while LICENSE specifies "GPL2" specifically.
2009-03-09Force rdoc 2.4.1 to run for me
Echoe/Rake seems to be loading the wrong version, tired of fighting it and figuring out what it's doing...
2009-03-04README: documentation update
2009-03-04Add before_exec hook
This is useful for freeing certain resources you do NOT want passed to child processes.
2009-03-04Remove "directory" config option
Unicorn will always continue to run in the directory it started in, it does not chdir to "/". Since the default start_ctx[:cwd] is symlink-aware, this should not be a problem for Capistrano-deployed applications.
2009-03-04Ensure we always try to have a default listener
This is a followup to 11172f9bdcc7c57c9ae857a8088e49527a953fa1