You are viewing limited content. For full access, please sign in.

Question

Question

workflow email errors - random send errors, how to catch/retry

asked on January 21, 2020

We have a workflow that sends out 1000s of emails daily.  We use Mandrill for this, which is a SMTP transactional mail service.

99.9% of the time this works, every day we have a handful of these emails that don't send.

In workflow error_logs we see email errors like:

 

    <ExceptionType>System.Net.Mail.SmtpException, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
    <Message>Service not available, closing transmission channel. The server response was: 4.4.2 relay-6.us-west-2.relay-prod Error: timeout exceeded</Message>
    <Source>System</Source>

 

I am looking for options to catch and maybe retry if a SMTP workflow email send fails?  Is there an option or method for this?

 

Any suggestions?

 

Thanks

 

Jeff

 

 

0 0

Replies

replied on January 21, 2020

You can add a task error handler for that error code.

1 0
replied on January 22, 2020

You can redesign existing solution using workflow action under "Flow Control " called Condition Parallel. Each branch should be set up against the flag which would further be validated down in the flow thus will help you understand the pattern when the service is getting timeout. Please ensure you use Delay action in each branch of at least 10 seconds starting from second branch. . Each branch should be broken based email number so if 1000 email are sent then set up at least 10 branches to start with. Then it can be increased or decreased so forth based on the understanding that we develop.

0 0
replied on January 23, 2020

I am working with the task error handler and a try/catch loop.

 

How do I specify a "task error handler" in the catch loop, there are a bunch of error types to pick from however I cannot locate the specific task error handler I create in workflow admin.

 

Perhaps I am missing something?  The docs describe this as an option but provide no example configs.

0 0
replied on January 24, 2020

Task error handlers are processed at the server level and they eliminate the need to handle each instance of the activity manually with a Try-Catch loop.

You want to add a new error handler with the new SMTP error from your original post.

0 0
replied on February 20, 2020

Hi, I consider that this is not a solution, it is only a patch (badly done), even this How do I do for LF tries to connect to Server SMTP again? because once does not send ONE email it never send again until restart service 

Thanks.

0 0
replied on February 20, 2020

We understand your frustration, but please continue updating your support case. The issue you are experiencing is likely not the same thing discussed in this thread.

0 1
replied on February 20, 2020 Show version history

Excuse me, but it's same reported error here. with only one difference, our mail server is 365, and support team didn´t suggest any solution during almost 4 months.

0 0
replied on February 20, 2020

The error is similar, but as Jeff indicates both above and below, in his case the error is transient. You indicate that in your case the error requires a server restart to resolve.

You have the option to escalate your support case if you don't think it's moving at an acceptable pace. I understand that you're frustrated, but Answers is not the best venue to solve this issue.

0 0
replied on February 20, 2020

In my try/catch loop I am seeing the catch loop triggering and I can correlate that to a timeout connecting to the SMTP service (mandrill).  These are rare errors but enough that I am seeing them.

 

On the catch we are re-sending the email/attachment so that effectively 'tries" again and thus sends the email that timed out.

 

So, this approach does seem to work as far as resending timed-out SMTP sends.

 

 

 

0 0
replied on February 20, 2020 Show version history

Hi, could  you please explain how do you do this: correlate that to a timeout connecting to the SMTP service? thanks

0 0
replied on February 20, 2020

Hi Omar

 

See screenshot of workflow.

 

In the try branch we have the email SMTP send task, if that works it just send the email and all is good.

 

In the catch condition we watch for any errors, as selected in the screenshot, so a SMTP timeout is an error and that triggers the catch branch - we then resend the email that timed out, and send an email to the developers (the debug email) with the fact that the catch branch triggered.   As we have just the one task in the try branch this has been working well. 

 

It would be nice if I could trigger on a specific error, but we tried some ideas there and didn't make much progress.

Jeff

 

 

screenshot.png
screenshot.png (216.71 KB)
0 0
replied on February 21, 2020

Thanks a lot Jeff.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.