Fwd: Support for Soft Timeout in Unicorn

Eric Wong normalperson at yhbt.net
Thu Jun 3 13:37:49 EDT 2010


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 <oct at fotonauts.com> -----

Subject: Fwd: Support for Soft Timeout in Unicorn
From: Pierre Baillet <oct at fotonauts.com>
To: unicorn at bogomips.org

Hi,

Just tried to send that through the ml, but it seems something went wrong...

Cheers,
-- 
Pierre.

---------- Forwarded message ----------
From: <mongrel-unicorn-owner at rubyforge.org>
Date: Thu, Jun 3, 2010 at 2:40 PM
Subject: Support for Soft Timeout in Unicorn
To: oct at fotonauts.com


The message's content type was not explicitly allowed



---------- Forwarded message ----------
From: Pierre Baillet <oct at fotonauts.com>
To: mongrel-unicorn at 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 <oct at fotonauts.com>
http://www.fotopedia.com/




-- 
Pierre Baillet <oct at fotonauts.com>
http://www.fotopedia.com/

----- End forwarded message -----


More information about the mongrel-unicorn mailing list