From: Eric Wong <normalperson@yhbt.net>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Cc: Serg Podtynnyi <serg@podtynnyi.com>
Subject: Re: Unicorn logging in production env
Date: Wed, 17 Aug 2011 10:04:17 +0000 [thread overview]
Message-ID: <20110817100417.GB13605@dcvr.yhbt.net> (raw)
In-Reply-To: <20110817095835.GA13605@dcvr.yhbt.net>
Eric Wong <normalperson@yhbt.net> 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/20110421232615.GA27468@dcvr.yhbt.net
--
Eric Wong
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying
next prev parent reply other threads:[~2011-08-17 10:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-16 15:45 Unicorn logging in production env Serg Podtynnyi
2011-08-16 17:30 ` Eric Wong
2011-08-17 9:21 ` Serg Podtynnyi
2011-08-17 9:58 ` Eric Wong
2011-08-17 10:04 ` Eric Wong [this message]
2011-08-16 22:17 ` John Fieber
2011-08-17 0:45 ` Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://yhbt.net/unicorn/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110817100417.GB13605@dcvr.yhbt.net \
--to=normalperson@yhbt.net \
--cc=mongrel-unicorn@rubyforge.org \
--cc=serg@podtynnyi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhbt.net/unicorn.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).