[Backgroundrb-devel] smtp timeout failures

Geoff Garside ruby at geoffgarside.co.uk
Tue Jun 12 15:13:56 EDT 2007

Have you tried wrapping the delivery in a Timeout block? Something  
along the lines of

		Timeout::timeout(15) do
	rescue Timeout::Error
		# ActionMailer took too long

It might work, but I have admittely not tested this in the least.


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/0a287c93/attachment.html 

More information about the Backgroundrb-devel mailing list