[Backgroundrb-devel] smtp timeout failures

Justin Garten jgarten at postful-inc.com
Tue Jun 12 15:32:56 EDT 2007


Geoff,

I tried this previously, thinking that it would at least catch and repackage
the exception in a way that might make it through to backgroundrb, but it
didn't help.  Since I have no problem with other exceptions being passed
through, I was surprised that this didn't work.

I must admit, I'm quite stumped at this point.

-Justin

On 6/12/07, Geoff Garside <ruby at geoffgarside.co.uk> wrote:
>
> Have you tried wrapping the delivery in a Timeout block? Something along
> the lines of
> begin
> Timeout::timeout(15) do
> ActionMailer.stuff(weeeee)
> end
> rescue Timeout::Error
> # ActionMailer took too long
> end
>
> It might work, but I have admittely not tested this in the least.
>
> Geoff
>
>
> On 11 Jun 2007, at 22:55, Justin Garten wrote:
>
> Hi.
>
> I'm using backgroundrb to, in part, wrap smtp transactions made through
> actionmailer.  The problem is that when smtp fails with a timeout error, the
> worker simply stops at that point.
>
> No exception is returned. I've tried wrapping this call in a
> begin...rescue block but no exception seems to be making it back to the
> worker (other methods are correctly passing exceptions to the worker).
>
> I've tested to see if this is an issue of the delay prior to the exception
> being thrown by creating a method that sleeps prior to throwing an exception
> but this is passed through and caught without issue.
>
> When I generate smtp timeout errors in console, I receive the exception
> normally.  I'm trying to figure out what could be different about the
> combination of backgroundrb and actionmailer.
>
> If anyone has suggestions for what else I can try in testing this or has
> experience with this, I'd very much appreciate the help.
>
> Thanks in advance!
>
> -Justin
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20070612/6aa0e6e3/attachment-0001.html 


More information about the Backgroundrb-devel mailing list