From: Eric Wong <normalperson@yhbt.net>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Subject: Re: Timeout callback
Date: Mon, 26 Sep 2011 01:42:59 +0000 [thread overview]
Message-ID: <20110926014259.GB19028@dcvr.yhbt.net> (raw)
In-Reply-To: <4D4841AA1FE04C98BF883BDE8B17741E@gmail.com>
Alex Sharp <ajsharp@gmail.com> wrote:
> Would there be any support for a worker-level timeout callback, for
> workers that get killed by the master process for violating the
> Unicorn::Configurator.timeout setting?
Something like this /cannot/ be done right. The unicorn timeout uses
SIGKILL because SIGKILL is a last resort and not
catchable/blockable/trappable in user space. (SIGSTOP is in the same
boat as SIGKILL).
> I'm thinking the method could be on the Unicorn::Configurator class,
> something like ".at_timeout_exit". My thinking here is I want to be
> able to invoke caller() and get a backtrace to figure out the code
> that's resulting in timeouts.
Getting a backtrace relies on Ruby being in a runnable state.
If user space (and Ruby) is capable of accepting non-SIGKILL/SIGSTOP,
you could already be using something along the lines of the Timeout
module in Ruby stdlib, SystemTimeout, or the Rainbows::ThreadTimeout
middleware.
In other words, you can already use an application-level timeout
(even around the entire app dispatch) if you could get a backtrace.
_______________________________________________
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-09-26 1:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-26 1:24 Timeout callback Alex Sharp
2011-09-26 1:42 ` Eric Wong [this message]
2011-09-26 6:06 ` Christopher Bailey
2011-09-26 19:04 ` Alex Sharp
2011-09-26 19:02 ` Alex Sharp
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=20110926014259.GB19028@dcvr.yhbt.net \
--to=normalperson@yhbt.net \
--cc=mongrel-unicorn@rubyforge.org \
/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).