about summary refs log tree commit homepage
DateCommit message (Collapse)
2009-05-26unicorn 0.8.0 v0.8.0
2009-05-26remove trickletest from Manifest
2009-05-25Switch to autoload to defer requires
This should prevent Rack from being required too early on so "-I" being passed through the unicorn command-line can modify $LOAD_PATH for Rack
2009-05-25Only refresh the gem list when building the app
No point in refreshing the list of gems unless the app can actually be reloaded.
2009-05-25Refresh Gem list when building the app
On application reloads, Gems installed by the Ruby instance may be different than when Unicorn started. So when preload_app is false, HUP-ing Unicorn will always refresh the list of Gems before loading the application code.
2009-05-22Merge commit 'v0.7.1'
* commit 'v0.7.1': unicorn 0.7.1 Conflicts: lib/unicorn/const.rb
2009-05-22unicorn 0.7.1 v0.7.1
2009-05-22Merge branch 'benchmark'
* benchmark: Define HttpRequest#reset if missing
2009-05-22Define HttpRequest#reset if missing
Newer versions of Unicorn do not include a #reset method
2009-05-22Merge branch '0.7.x-stable'
* 0.7.x-stable: GNUmakefile: glob all files in bin/* Disable formatting for command-line switches test_response: correct OFS test http_response: allow string status codes Enforce minimum timeout at 3 seconds configurator: fix rdoc formatting Preserve 1.9 IO encodings in reopen_logs Fix a warning about @pid being uninitialized TUNING: add a note about somaxconn with UNIX sockets Ignore unhandled master signals in the workers Safer timeout handling and test case app/old_rails: correctly log errors in output Add TUNING document app/exec_cgi: GC prevention Add example init script test_upload: still uncomfortable with 1.9 IO encoding... test_request: enable with Ruby 1.9 now Rack 1.0.0 is out
2009-05-22GNUmakefile: glob all files in bin/*
Easier to maintain and add new executables this way
2009-05-22Disable formatting for command-line switches
Copy and pasting from the RDoc web page and passing "\342\200\224config-file" to the command-line does not work.
2009-05-22test_response: correct OFS test
Must have multiple headers to test this effectively
2009-05-22http_response: allow string status codes
Rack::Lint says they just have to work when to_i is called on the status, so that's what we'll do.
2009-05-22Enforce minimum timeout at 3 seconds
2 seconds is still prone to race conditions under high load. We're intentionally less accurate than we could be in order to reduce syscall and method dispatch overhead.
2009-05-22configurator: fix rdoc formatting
2009-05-22Preserve 1.9 IO encodings in reopen_logs
Ensure we preserve both internal and external encodings when reopening logs.
2009-05-22Fix a warning about @pid being uninitialized
2009-05-22TUNING: add a note about somaxconn with UNIX sockets
2009-05-22Ignore unhandled master signals in the workers
This makes it easier to use "killall -$SIGNAL unicorn" without having to lookup the correct PID.
2009-05-22Safer timeout handling and test case
Timeouts of less than 2 seconds are unsafe due to the lack of subsecond resolution in most POSIX filesystems. This is the trade-off for using a low-complexity solution for timeouts. Since this type of timeout is a last resort; 2 seconds is not entirely unreasonable IMNSHO. Additionally, timing out too aggressively can put us in a fork loop and slow down the system. Of course, the default is 60 seconds and most people do not bother to change it.
2009-05-22app/old_rails: correctly log errors in output
"out" was an invalid variable in that context...
2009-05-22Add TUNING document
Most of this should be applicable to Mongrel and other web servers, too.
2009-05-22app/exec_cgi: GC prevention
Don't allow newly created IO objects to get GC'ed and subsequently close(2)-ed. We're not reopening the {$std,STD}{in,out,err} variables since those can't be trusted to have fileno 1, 2 and 3 respectively.
2009-05-22Add example init script
This was done in Bourne shell because it's easier for UNIX sysadmins who don't know Ruby to understand and modify. Additionally, it can be used for nginx or anything else that shares compatible signal handling.
2009-05-22test_upload: still uncomfortable with 1.9 IO encoding...
It seems most applications use buffered IO#read instead of IO#sysread. So make sure our encoding is set correctly for buffered IO#read applications, too.
2009-05-22test_request: enable with Ruby 1.9 now Rack 1.0.0 is out
2009-05-21GNUmakefile: glob all files in bin/*
Easier to maintain and add new executables this way
2009-05-21Disable formatting for command-line switches
Copy and pasting from the RDoc web page and passing "\342\200\224config-file" to the command-line does not work.
2009-05-13privatize constants only used by old_rails/static
Unicorn proper no longer needs these constants, so don't bother with them.
2009-05-13test_response: correct OFS test
Must have multiple headers to test this effectively
2009-05-13http_response: allow string status codes
Rack::Lint says they just have to work when to_i is called on the status, so that's what we'll do.
2009-05-13Require Rack for HTTP Status codes
Preventing needless duplication since Rack already has these codes for us. Also, put the status codes in HttpResponse since nothing else needs (or should need) them.
2009-05-12Reopen master logs on SIGHUP, too
There may be other logs opened if preload_app is true besides stderr/stdout paths. So err on the safe side and reopen everything.
2009-05-11exec_cgi: don't assume the body#each consumer is a socket
If we're using middleware that pushes the body into an array, bad things will happen if we're clobbering the string for each iteration of body#each.
2009-05-11HttpRequest::DEF_PARAMS => HttpRequest::DEFAULTS
Give this a more palatable name and unfreeze it, allowing users to modify it more easily.
2009-05-10Remove trickletest
This is a very important test for web servers designed to serve slow clients, but Unicorn is not that.
2009-05-10Avoid killing sleeping workers
This used to happen on machines that were coming out of suspend/hibernation.
2009-05-10Enforce minimum timeout at 3 seconds
2 seconds is still prone to race conditions under high load. We're intentionally less accurate than we could be in order to reduce syscall and method dispatch overhead.
2009-05-10app/exec_cgi: use explicit buffers for read/sysread
This reduces garbage generation to improve performance. Rack 1.0 allows InputWrapper to read with an explicit buffer.
2009-05-10http_request: use Rack::InputWrapper-compatible methods
This allows alternative I/O implementations to be easier to use with Unicorn...
2009-05-10configurator: fix rdoc formatting
2009-05-04Preserve 1.9 IO encodings in reopen_logs
Ensure we preserve both internal and external encodings when reopening logs.
2009-05-04Inline and remove the HttpRequest#reset method
These potentially leaves an open file handle around until the next request hits the process, but this makes the common case faster.
2009-05-04Fix a warning about @pid being uninitialized
2009-05-03Speed up the worker accept loop
First, reduce no-op fchmod syscalls under heavy traffic. gettimeofday(2) is a cheaper syscall than fchmod(2). Since ctime resolution is only in seconds on most filesystems (and Ruby can only get to seconds AFAIK), we can avoid fchmod(2) happening within the same second. This allows us to cheat on synthetic benchmarks where performance is measured in requests-per-second and not seconds-per-request :) Secondly, cleanup the acceptor loop and avoid nested begins/loops as much as possible. If we got ECONNABORTED, then there's no way the client variable would've been set correctly, either. If there was something there, then it is at the mercy of the garbage collector because a method can't both return a value and raise an exception.
2009-05-04test_signals: ready workers before connecting
Otherwise there's a chance a child won't have a socket bound by the time we're trying to connect.
2009-05-03Instant shutdown signals really mean instant shutdown
Use SIGQUIT if you're going to be nice and do graceful shutdowns. Sometimes people run real applications on this server and SIGINT/SIGTERM get lost/trapped when Object is rescued and that is not good. Also make sure we break out of the loop properly when the master is dead. Testcases added for both SIGINT and dead master handling.
2009-05-04Remove redundant socket closing/checking
If our response succeeds, we've already closed the socket. Otherwise, we would've raised an exception at some point hit one of the rescue clauses.
2009-05-03TUNING: add a note about somaxconn with UNIX sockets