Timeout of Server Action itself
Question
Application Type
Reactive
Service Studio Version
11.10.16 (Build 40208)
Platform Version
11.10.0 (Build 22422)

Hello, 

When a Reactive Web app calls a Server Action from its Client Action, the Client Action will receive a CommunicationException after Server Request Timeout property seconds of the Server Action.
However, the Server Action itself continues its process without dependency to the client exception.

If a developer makes a logic with infinity loop in his Server Action Flow and performs it unfortunately, will the process be running forever on the Platform Server? Or until restarting IIS?

Sincerely,
Moriya Takasi

HI Takasi,

Please have a look on this post

 https://www.outsystems.com/forums/discussion/64948/server-request-timeout-reactive-web/#

This might help on what your looking for.

Hope this helps,

Kind regards,

Chris


Hello Christopher, 

Thank you for commenting. The post you linked is great for me.

In the post, Raphael said REST service timeout is 110 seconds for .NET 2.0 or later.

But my Server Action using Forge's Sleep with 600000 SleepInMs parameter (600 seconds) from my Reactive Web's Client Action can run normally without timeouted. I can't find how to timeout my Server Actions after I read the post.

I think this needs to be handled carefully while designing the logic. I'm not sure on what your use case is, but you want to timeout a server action. For this, you need to assign the timeout local variable at the start of the server action as AddDateTime(CurrDateTime(),20) for 20 min timeout. Then, during the critical process (say a loop, updating a records, etc), you need to check whether timeout passed by comparing it with current time. If so, end the server action, so that it returns back (process ends). We usually use this in Timers to make it run within limits.

Below post explains well on handling timeouts: https://medium.com/@marketing_52184/how-to-build-a-timer-in-outsystems-4c49079c19dd

Thanks,

Somesh

Hello Somesh, 

Thanks for comment.
I completely agree with your opinion that developers have to handle carefully while designing logic.

On the one hand, development platform like OutSystems which is shared by multiple developers should be fool proof system.
If there are no way to stop running unlimited loop logic from outside without any impact for other processes and are no way to limit continuing them (such like timeout property of timer), it is never fool proof system.

For example, editing machine.config/web.config might achieve to do them?
(I have already known that executionTimeout of machine.config doesn't affect to the behavior I wrote above.)

Sincerely,
Moriya Takasi

Tiago Peres attached an extension in the thread below.
https://www.outsystems.com/forums/discussion/17461/time-out-webservice/

Using the extension I was able to introduce time out to the case I wrote above.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.