1

I'm using OutSystems plataform and recently I'm getting timeout from a periodic e-mail. The timer responsible for this action has 20min timeout but the timer fails after 100s.

Some times the timer executes in 99s and the process finish successfully.

The error:

OutSystems.HubEdition.RuntimePlatform.EmailException: Error creating Email. The operation has timed out

How can I change this behavior to extend this 100s timeout?

jpmo22
  • 77
  • 8
  • I think the below answers are clear. You can't increase the timeout for the email and you do not need that. You might get the timeout because you have really heavy calculations and works inside the preparation of the email. If you do this, then have a timer first go to an action, do all the works and calculations inside that action then pass the information you need as the parameters to the email. It will be helpful if you could share with us the way you approached in order to help you. – Abdulhakeem Jun 22 '17 at 07:13
  • Thats it I must get the job done faster. I need to change the logic. Thanks for your help. – jpmo22 Jun 22 '17 at 17:09

2 Answers2

1

You can increase the timeout setting on the Aggregate / Advanced query that you are using to retrieve the data. Improving the query is always first prize, but increasing the timeout could by you some time.

UPDATE

According to the OutSystems documentation you cannot set the timeout for email rendering. You would have to speed up the rendering.

You could perhaps split your logic into an action that executes the query and stores the result for quick retrieval during the email preparation.

Hanno
  • 467
  • 11
  • 21
  • My query runs in 175 seconds. The query execution timeout is 1200s (yeah I know that is too much) and if I run the query out of e-mail process it's runs normally. – jpmo22 Jun 22 '17 at 02:37
  • what is the platform and service studio version you are using? – Hanno Jun 22 '17 at 04:24
  • I'm using 9.1.0.20 version. – jpmo22 Jun 22 '17 at 17:04
  • 1
    @jpmo22 perhaps you could do your query in a separate timer, save the results to another entity and use *that* for rendering the email. The whole thing could be easily orchestrated by a Process (see OutSystems documentation on how to create and launch processes). – Miguel Ventura Aug 02 '17 at 22:22
0

Probably the issue you're having is that the email is taking too long to render. You can check if this is the case by looking at the error log in Service Center. You should see something like:

Error creating Email. The operation has timed out
   at System.Net.HttpWebRequest.GetResponse()
   at OutSystems.HubEdition.RuntimePlatform.Email.EmailHelper.HttpGetContent(String ssUrl, String method, String contentType, String userAgent, Cookie cookie, QueryParameter[] parameters, String& ssContent, String& ssContentEncoding)

If this is the case, you need to optimize the email in order to render it faster. One good place to start looking is the Slow Queries report, maybe you have some long running query that's slowing down your email rendering...

Best of luck! If you want more details, you can check this community post.

Rodrigo SC
  • 36
  • 3
  • I know that e-mail is taking too long and I'll resolve this with a better query but to get the job done I need to raise the timeout. Is it possible? – jpmo22 Jun 21 '17 at 17:31
  • Currently it is not possible to customize the timeout for email rendering... you'll need to do something about that query... – Rodrigo SC Jun 22 '17 at 08:00