24
Views
17
Comments
Server Request Timeout - Reactive Web
Question

Reactive Web Application.

I would like to ask for your advice, I'm using reactive web also. Calling a server action from a Client action, there is a default Server Request Timeout set. When that certain server timeout  was hit, will it leave the called server action running even server timeout is already invoke in client side? Currently my observation is even timeout was raised in client side, the server action will still run and finish.

Rank: #129

Hi Cie,


It means that it will throw an exception of timeout (something like this Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. ).


The server action will be aborted and you can handle the exception the way you want.

If you want things to be run on the server without the client side having to wait, you can trigger a timer or launch a BPT / Light BPT to process the server side action asynchronously.


Hope it helps.


Cheers,

João Marques

Rank: #274

You are right, Cie, that's exactly what I noticed as well. The front-end times out, but the server request gets executed till the end.

Rank: #129

Hi Cie,


You are right, my bad.

I was reading the documentation and the Server Request Timeout is the time the client will wait before throwing a communication exception, thus not aborting the server action when the limit time is reached.


What you can do to force the server side to have a given timeout is pass a parameter for seconds and on the server side action you use the SetRequestTimeout action from HTTPRequestHandler API (see here). In this way, you can control from the client, the timeout the server will have and you can force it to be the same.


Cheers,

João

Rank: #13231

Hi Joao, that is what im thinking right now..Ill try then ill let you know..Thanks.

Rank: #129

I'm curious to see how it goes, it would still be a workaround but it sounds good. João

Rank: #13231

Hi Joao, it didn't work hehehe..

Rank: #129

Hi Cie,


It does sound like a bug, since according to the documentation the action sets the timeout of the current HTTP request and a server action is an HTTPS request. At least it does not match the documentation.

Rank: #13231

Yeah, im not sure what should be the handling for this scenario...

Rank: #13231

Does anyone knows how to handle this Server Timeout issue in Client side?

Rank: #13231

I still wasn't able to resolve the issue..hmmm anyone know how to handle such?

mvp_badge
MVP
Rank: #64

Hi Cie,

I had the same issue in past which i manage initially by increasing the Server Request Timeout at module level . The default Timeout was 10Sec which you can change to any other time.

Then i realize that the server action that i build has a lot of functionality and multiple server actions inside it and is taking more then 10 seconds to execute . I then looked into all such server action and break them in two or more server actions which solved the timeout issue and then i changed the Server Request Timeout value back to 10 Seconds.

You can also see such warnings in Architecture Dashboard about long Server Actions.



Regards,

-PJ-

mvp_badge
MVP
Rank: #64

Hi Cie,

I got your point , but here actually the server action is not timing out rather the client request which is supposed to wait for 10 Sec (default timeout) is timing out and the server action will continue until it reaches to the end of execution or it reaches to its own timeout.

The default Server request timeout is AFAIK is 100 sec and hence the chances of having server request timeout is very low until we are not performing any bulk operation in it.

Also i don't think once you receive a timeout at client side you will have any control on the server action to abort it , as internally it happens through the fast api call and once invoked they have there own lifecycle.


Regards,

-PJ-

Rank: #13231

Hi PJ, Thanks for your response, so this is how reactive web behave. But i tried setting the server request timeout during run time, but it didn't work also..

mvp_badge
MVP
Rank: #64

Hi Cie,

Yes the Sever Request Timeout is to increase the wait time for the http request to complete. The reason of its not working may be because of the Reactive Web behavior . In reactive web the server action will call differently via client side code and as i mentioned , internally these calls happens through the fast rest api .


Regards,

-PJ-