From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS14383 205.234.109.0/24 X-Spam-Status: No, score=-0.5 required=5.0 tests=AWL,MSGID_FROM_MTA_HEADER, RP_MATCHES_RCVD shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: Eric Wong Newsgroups: gmane.comp.lang.ruby.unicorn.general Subject: Fwd: Support for Soft Timeout in Unicorn Date: Thu, 3 Jun 2010 17:37:49 +0000 Message-ID: <20100603173749.GA19649@dcvr.yhbt.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1275586982 30178 80.91.229.12 (3 Jun 2010 17:43:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 3 Jun 2010 17:43:02 +0000 (UTC) Cc: Pierre Baillet To: mongrel-unicorn@rubyforge.org Original-X-From: mongrel-unicorn-bounces@rubyforge.org Thu Jun 03 19:42:55 2010 Return-path: Envelope-to: gclrug-mongrel-unicorn@m.gmane.org X-Original-To: mongrel-unicorn@rubyforge.org Delivered-To: mongrel-unicorn@rubyforge.org Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-BeenThere: mongrel-unicorn@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: mongrel-unicorn-bounces@rubyforge.org Errors-To: mongrel-unicorn-bounces@rubyforge.org Xref: news.gmane.org gmane.comp.lang.ruby.unicorn.general:521 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OKERO-0004qj-Fx for gclrug-mongrel-unicorn@m.gmane.org; Thu, 03 Jun 2010 19:42:50 +0200 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id B444D185831A; Thu, 3 Jun 2010 13:42:49 -0400 (EDT) Received: from dcvr.yhbt.net (dcvr.yhbt.net [64.71.152.64]) by rubyforge.org (Postfix) with ESMTP id E0626185831A for ; Thu, 3 Jun 2010 13:37:50 -0400 (EDT) Received: from localhost (unknown [127.0.2.5]) by dcvr.yhbt.net (Postfix) with ESMTP id C1E791F4E5; Thu, 3 Jun 2010 17:37:49 +0000 (UTC) Hi, HTML attachments are wasteful and thus rejected from the mailing list. On the other hand, it actually helps to include the patch itself (inline) so it's readable without a (human) context switch :) ----- Forwarded message from Pierre Baillet ----- Subject: Fwd: Support for Soft Timeout in Unicorn From: Pierre Baillet To: unicorn@bogomips.org Hi, Just tried to send that through the ml, but it seems something went wrong... Cheers, -- Pierre. ---------- Forwarded message ---------- From: Date: Thu, Jun 3, 2010 at 2:40 PM Subject: Support for Soft Timeout in Unicorn To: oct@fotonauts.com The message's content type was not explicitly allowed ---------- Forwarded message ---------- From: Pierre Baillet To: mongrel-unicorn@rubyforge.org Date: Thu, 3 Jun 2010 14:16:01 +0200 Subject: Support for Soft Timeout in Unicorn Hi, We use Unicorn at fotopedia since yesterday in production. We switched from Passenger due to an issue in the way Passenger was handling some error in our main application. Things run very well on Unicorn. We have also modified Unicorn to handle a soft timeout for its workers. The Unicorn timeout was killing the workers without any chance for us to catch the Rails stack trace and identify the issue. I've forked and branched Unicorn from github and added a soft_timeout configuration value that is used for long running workers. The workers now handle SIGABRT and will raise an exception. This will crash the Rails application if it can be crashed and force the framework to dump the stack trace in the logs. Let me know if this might be useful for other people and, why not, integrate that in the main Unicorn code ! http://github.com/octplane/unicorn/tree/SOFT_TIMEOUT_SUPPORT Cheers, -- Pierre Baillet http://www.fotopedia.com/ -- Pierre Baillet http://www.fotopedia.com/ ----- End forwarded message ----- _______________________________________________ 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