summary refs log tree commit homepage
AgeCommit message (Collapse)AuthorFilesLines
2009-05-22unicorn 0.7.1 v0.7.1Eric Wong2-1/+2
2009-05-22GNUmakefile: glob all files in bin/*Eric Wong1-2/+4
Easier to maintain and add new executables this way
2009-05-22Disable formatting for command-line switchesEric Wong1-2/+2
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 testEric Wong1-1/+1
Must have multiple headers to test this effectively
2009-05-22http_response: allow string status codesEric Wong2-1/+9
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 secondsEric Wong1-2/+2
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 formattingEric Wong1-19/+19
2009-05-22Preserve 1.9 IO encodings in reopen_logsEric Wong3-5/+98
Ensure we preserve both internal and external encodings when reopening logs.
2009-05-22Fix a warning about @pid being uninitializedEric Wong1-0/+1
2009-05-22TUNING: add a note about somaxconn with UNIX socketsEric Wong1-0/+4
2009-05-22Ignore unhandled master signals in the workersEric Wong1-1/+1
This makes it easier to use "killall -$SIGNAL unicorn" without having to lookup the correct PID.
2009-05-22Safer timeout handling and test caseEric Wong3-7/+6
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 outputEric Wong1-2/+2
"out" was an invalid variable in that context...
2009-05-22Add TUNING documentEric Wong3-0/+62
Most of this should be applicable to Mongrel and other web servers, too.
2009-05-22app/exec_cgi: GC preventionEric Wong1-3/+3
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 scriptEric Wong1-0/+54
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...Eric Wong1-0/+18
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 outEric Wong1-5/+0
2009-04-25unicorn 0.7.0 v0.7.0Eric Wong2-1/+2
2009-04-25Rack 1.0.0 compatibilityEric Wong2-2/+2
Keep in mind that it's plenty possible to use Unicorn as a library without using Rack itself. Most of the unit tests do not depend on Rack, for example.
2009-04-25Fix log rotation being delayed in workers when idleEric Wong1-1/+1
We were closing a no-longer-existent I/O object to break out of This was broken in 0.6.0 but did not affect the worker when it was busy.
2009-04-24configurator: "listen" directive more nginx-likeEric Wong2-1/+4
The following specifications to bind port 8080 on all interfaces are now accepted in the configuration file: listen "8080" # (with quotes) listen 8080 # (without quotes)
2009-04-24doc: formatting changes for SIGNALS docEric Wong1-26/+26
2009-04-24unicorn 0.6.0 v0.6.0Eric Wong2-1/+2
2009-04-24cleanup: avoid duped self-pipe init/replacement logicEric Wong1-7/+9
We do this in both the worker and master processes, so avoid repeating ourselves.
2009-04-24SIGTT{IN,OU} {in,de}crements worker_processesEric Wong4-10/+42
This allows dynamic tuning of the worker_processes count without having to restart existing ones. This also allows worker_processes to be set to a low initial amount in the config file for low-traffic deployments/upgrades and then scaled up as the old processes are killed off. Remove the proposed reexec_worker_processes from TODO since this is far more flexible and powerful. This will allow not-yet-existent third-party monitoring tools to dynamically change and scale worker processes according to site load without increasing the complexity of Unicorn itself.
2009-04-24Allow std{err,out}_path to be changed via HUPEric Wong1-3/+8
Seems like a good idea to be able to relocate log files on a config reload.
2009-04-24minor cleanups and save a few variablesEric Wong1-27/+23
Saying to the world that I may have OCD...
2009-04-24Avoid getppid() if serving heavy trafficEric Wong1-1/+2
As long as our speculative accept()s are succeeding, then avoid checking for master process death and keep processing requests. This allows us to save some syscalls under extremely heavy traffic spikes.
2009-04-24Fixup reference to a dead variableEric Wong1-8/+8
Oops, this was broken in another yak-shaving commit: 9206bb5e54a0837e394e8b1c1a96e27ebaf44e77
2009-04-23Describe the global constants we use.Eric Wong1-2/+14
Avoid scaring the thread-safety-first crowd (as much :)
2009-04-23make SELF_PIPE is a global constantEric Wong1-8/+8
Since it has to work inside signal handlers, there's no point in making it a per-object instance variable given the price of an instance variable in MRI...
2009-04-23http_response: minor performance gainsEric Wong3-7/+12
Avoid creating garbage every time we lookup the status code along with the message. Also, we can use global const arrays for a little extra performance because we only write one-at-a time Looking at MRI 1.8, Array#join with an empty string argument is slightly better because it skips an append for every iteration.
2009-04-23http_response: just barely fasterEric Wong1-2/+2
2009-04-23test_socket_helper: disable GC for this testEric Wong1-0/+5
Otherwise the GC will unlink sockets. A better solution (purgatory?) may be needed...
2009-04-23Make LISTENERS and WORKERS global constants, tooEric Wong1-27/+28
Instance variables are expensive and we'd be encouraging something like a thread-safe mentality for using ivars when dealing with things that are global to the entire process.
2009-04-23IO_PURGATORY should be a global constantEric Wong1-6/+5
Since file descriptors are only private to a process, do not treat them as Object-specific.
2009-04-23http_request: micro optimizationsEric Wong1-54/+53
This leads to a ~10% improvement in test/benchmark/request.rb Some of these changes will need to be reworked for multi-threaded servers (Mongrel); but Unicorn will always be single-threaded.
2009-04-23Merge commit 'v0.5.4'Eric Wong1-0/+1
* commit 'v0.5.4': unicorn 0.5.4 Fix data corruption with small uploads via browsers Conflicts: lib/unicorn/http_request.rb
2009-04-23test_exec: cleanup stale socket on exitEric Wong1-0/+1
2009-04-23unicorn_rails: avoid nesting lambdasEric Wong1-9/+4
I've experienced occasional problems with this so it's probably best to stay on the safe side.
2009-04-23GNUmakefile: mark test_upload as a slow testEric Wong1-1/+1
2009-04-23Get rid of UNICORN_TMP_BASE constantEric Wong2-3/+1
It was just a waste of space and would've caused line wrapping. This reinstates the "unicorn" prefix when we create tempfiles, too.
2009-04-23unicorn 0.5.4 v0.5.4Eric Wong1-0/+1
2009-04-23Fix data corruption with small uploads via browsersEric Wong2-9/+27 does not update the offset for new writes. So instead create the StringIO object and then syswrite to it and try to follow the same code path used by large uploads which use Tempfiles.
2009-04-23Fix data corruption with small uploads via browsersEric Wong2-9/+27 does not update the offset for new writes. So instead create the StringIO object and then syswrite to it and try to follow the same code path used by large uploads which use Tempfiles.
2009-04-21Cleanup GNUmakefile and fix dependenciesEric Wong1-25/+22
Installation dependencies weren't being resolved correctly (since "install-test") wasn't .PHONY. Removed the "install-test" target entirely since it should never be invoked by hand. On the other hand, "ragel" can be useful to invoke by hand so add a target for that.
2009-04-21Cleanup some unnecessary requiresEric Wong2-2/+0
2009-04-21test: empty port test for absolute URIsEric Wong1-0/+16
2009-04-21http11: support underscores in URI hostnamesEric Wong3-3/+22
They aren't common, but apparently there exist URLs with them, so we'll support them.