Eric Wong <[email protected]> wrote: > The the rest of the app should have local timeouts for all > non-deterministic calls.
If you're lazy, maybe the following middleware works, too, I haven't ever needed it but wrote (and later rewrote it) as a proof-of-concept: http://bogomips.org/rainbows.git/tree/lib/rainbows/thread_timeout.rb It should work with bare Unicorn if you remove the "Rainbows" references and the negative threshold handling in "initialize". If somebody wants I can split it into it's own gem (should work with WEBrick, Mongrel, Passenger, and maybe Thin), too). Unlike the Timeout library in Ruby stdlib, this doesn't allow nested timeout {} calls so it's simpler/possibly-safer in this regard... I even posted a request-for-review for the middleware on ruby-talk but didn't get any responses: http://mid.gmane.org/[email protected] -- Eric Wong _______________________________________________ Unicorn mailing list - [email protected] http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like this one) or top post when replying
