Timeout callback

Alex Sharp ajsharp at gmail.com
Mon Sep 26 15:04:04 EDT 2011

On Sunday, September 25, 2011 at 11:06 PM, Christopher Bailey wrote:
> What we wound up doing, which may or may not work for you, is to put
> an explicit Timeout wrapper around the code we knew caused this (we
> are lucky and knew a specific API call/controller action that was
> getting the timeouts). e.g. wrap with:
>  Timeout::timeout(...) do
> This wound up actually being a far better solution for us, because our
> mobile clients that call this API timeout the HTTP request at 20
> seconds anyway, so it was pointless to even get to 60. So, we now
> have a far better solution, one where we can time it out ourselves,
> handle the exception, and log the timeout/problem (e.g. we create a
> Zendesk ticket, etc.). Anyway, figured I'd mention that in case it
> could work in your case as well...
Great, thanks for sharing.

- Alex 

More information about the mongrel-unicorn mailing list