about summary refs log tree commit homepage
path: root/lib
DateCommit message (Collapse)
2009-10-14rack.multithread is only true for Thread* models
Enabling thread-safe or thread-aware code paths in applications may even be dangerous in some cases and cause deadlocks in code that otherwise does not expect threads. This is especially true of the Revactor case where being a "drop-in" replacement for IO routines is dangerous if a mutex is held while an Actor performs a "blocking" I/O operation. Basically start to assume that anybody writing an app using Rev or Revactor already takes Rev/Revactor concurrency into account and won't need the rack.multithread flag set to do special things.
2009-10-14preliminary Rev support
There is no TeeInput (streaming request body) support, yet, as that does not seem fun nor easy to do (or even possible without using Threads or Fibers or something to save/restore the stack...)
2009-10-11SIGINT/SIGTERM shuts down instantly in workers
Just like in Unicorn...
2009-10-11Fix graceful shutdowns for threaded models
They were completely broken in the refactoring :x
2009-10-11revactor: fix graceful shutdown timeouts
2009-10-11cleanup thread models, threads no longer time out
The process-based heartbeat continues, but we no longer time threads out just because a client is idle for any reason (for now).
2009-10-11revactor: continue fchmod beat in graceful exit
Avoid overloading the "alive" variable here and wakeup less frequently as well to do the fchmod.
2009-10-11revactor: graceful death of keepalive clients
We'll finish processing the current request and set the "Connection: close" header if possible.
2009-10-11No need to be halving timeout, already done for us
In Unicorn by HttpServer#init_worker_process
2009-10-11revactor: cleanups and remove redundancy
2009-10-11revactor: break on EBADF in the accepting actors
Once our listeners get closed, we're as good as dead so we should exit to avoid spinning.
2009-10-11expand and share init_worker_process
This can be common across everything
2009-10-11graceful exit on trap TypeError from IO.select
Avoid potential race conditions with signal handlers, this makes exits cleaner since the LISTENERS array will get map!-ed to nils in the :QUIT signal handler.
2009-10-11factor out common listen loop error handling
It'll be easier to maintain a common language for logging and debugging.
2009-10-10thread_spawn: clean up nuking of timed-out threads
We log thread destruction times now and also make a best-effort to avoid race conditions on threads that just finished.
2009-10-10thread_spawn: non-blocking accept() shouldn't EINTR
Something is probably wrong with the OS if it does, so make sure it gets logged and hopefully reported.
2009-10-10thread_spawn: more robust loop
Bad stuff happens, even in our own code because sometimes we don't know what we're doing. So log it so we'll know to fix it and let life go on...
2009-10-08thread_spawn: trap EAGAIN on accept_nonblock
EAGAIN is common on accept_nonblock with multiple processes sharing the same listen descriptors. oops :x
2009-10-08fchmod heartbeat flips between 0/1
This is for compatibility with OpenBSD as reported by Jeremy Evans for Unicorn.
2009-10-05doc: better "Rainbows!" RDoc examples and linkage
2009-10-05Rainbows! 0.1.1 v0.1.1
Fixed Ruby 1.8 support (and all 1.9 systems without Revactor). Process-wide timeout handling for the ThreadSpawn concurrency model should now work properly. Small cleanups everywhere. Eric Wong (16): Rakefile: add publish_news target Fix NEWS generation on single-paragraph tag messages README: move RDoc links down to fix gem description README: add install instructions summary: s/slow apps/sleepy apps/g Avoid naming names in LICENSE/README files rainbows/base: cleanup constant include tests: quiet down bin installation Add top-level "test" target for make local.mk.sample: sync to my current version tests: allow "make V=2" to set TEST_OPTS += -x cleanup temporary file usage in tests local.mk.sample: fix revactor dependency Thread* models: cleanup timeout management thread_spawn: fix timeout leading to worker death less error-prone timeouts for Thread models
2009-10-05less error-prone timeouts for Thread models
Avoid calling chmod on "false" leading to NoMethodError and rely entirely on LISTENERS.first being valid.
2009-10-05thread_spawn: fix timeout leading to worker death
2009-10-05Thread* models: cleanup timeout management
Ensure we reset the per-thread time Thread.current[:t] with each connection so we don't timeout long-lived connections.
2009-10-05rainbows/base: cleanup constant include
This was breaking badly under 1.8 since Revactor couldn't be included (the constant is listed once it is declared as an autoload).
2009-10-05Rainbows! 0.1.0 v0.1.0
Not using the Unicorn version number with this since it's not remotely close to Unicorn in stability.
2009-10-05huge documentation revamp
2009-10-04limit Rainbows! configuration method exposure
Only inject this method into Unicorn::Configurator to avoid polluting the namespace.
2009-10-04vary defaults for worker_connections
Various concurrency models work and scale differently, pick counts that make a reasonable amount of sense...
2009-10-04Add support for the ThreadSpawn concurrency model
This is somewhat like the original model found in Mongrel, except we refuse to accept() connections unless we have slots available. Even though we support multiple listen sockets, we only accept() synchronously to simplify processing and to avoid having to synchronize ThreadGroup management.
2009-10-04revactor: graceful exit if a listening actor dies
It's usually a bad sign if we have unhandled exceptions in the listener loops, so we'll exit just in case.
2009-10-04revactor: implement actor limiting
While we're at it, make it properly 100% message-driven so there's no more busy-waiting and polling for dead actors, No we just wait for client actors to die off and resume listener actors if they stopped accepting.
2009-10-04doc updates; use "Rainbows!", not "Rainbows"
Also add notes about development things and the configuration language which uses "Rainbows!". Calling ourselves "Rainbows!" will help us be taken even more seriously than if the project were just called "Rainbows"
2009-10-04revactor: allow UNIX domain socket listeners
Revactor may be gaining support for UNIX domain socket listeners soon, so factor out revactorize_listeners into its own method that can conditionally handle UNIX domain sockets if our Revactor version supports it. Patch for Revactor submitted here: http://rubyforge.org/pipermail/revactor-talk/2009-October/000035.html
2009-10-04configuration default tweaks
:Base is default (along with the implied worker_connections=1). This disallows nil for worker_connections, and makes.
2009-10-03thread_pool: Thread#kill! is gone in 1.9.2
So are Thread#terminate! and Thread#exit!, so we use Thread#kill instead.
2009-10-03common Base class for all concurrency models
They're similar enough (especially as far as the constants go) and allows a :Base to be used which basically acts like plain Unicorn but with HTTP keepalive + pipelining support
2009-10-03revactor: workaround for Revactor still using Rev::Buffer
Patch submitted upstream: http://rubyforge.org/pipermail/revactor-talk/2009-October/000034.html
2009-10-03remove Configurator and use Rainbows! block
This allows the server to be configured by doing something like this inside an existing Unicorn configuration file: Rainbows! do use :Revactor worker_connections 50 end This should make it obvious we're using Rainbows-only features.
2009-10-03http_server: simplify use=
I didn't remember extend when this was originally implemented.
2009-10-03configurator: rainbows settings must be in a block
This should make it easier to maintain/read configs that are Rainbows-specific
2009-10-03configurator: set worker_connections correctly
2009-10-02set "encoding: binary" for all files
2009-10-02initial revision
No tests yet, but the old "gossamer" and "rainbows" branches seem to be basically working.