How to adjust response timeout of outsystems upon waiting the response of rest api

Hi,

Can i ask if possible to adjust the response timeout in Outsystems. Because we encountered a problem every time we send the request using rest consume api and the response takes 10 to 15 secs to respond and after that the error will now display ("The connection has timed out"). Thank you


Hi Reuben, if your problem it's with http resquest, you will can use the action (SetRequestTimeout) to fix it.

This action should be executed before your request, maybe in screen action.

Hey Reuben,

If you're consuming a rest service, you can set the timeout per method.

See below image

Hope it helps.

Henrique Batista wrote:

Hey Reuben,

If you're consuming a rest service, you can set the timeout per method.

See below image

Hope it helps.

Hi,

Thank you for your feedback. I already try the two scenario but it won't work. Still getting the error "The connection has timeout". Thank you


Hi Henrique Batista,

I am also getting the same error "The connection has timeout ". I too tried the mentioned two methods didn't work. Do you know how tho fix this?

Thanks,

Ashwin

I tried these 2 methods, neither of them work for me.

I can also say that none of these options worked for me either.  I eventually tried this, and it worked.  I made my REST API, when it was consumed, store the huge JSON dataset as a binary in a database entity, and then call an Async Timer that in turn called a server action that did what I needed to do with the data sent to my API/Entity.  After the Async Timer was set off, I replied to the API consumer that my system had received the JSON and will now process the data.  I set the Timeout In Minutes on the timer to a large number so it would have plenty of time to finish the Server Action.  After the Server Action was completed, I had the action call a Rest API that updated the previous consumer to say that it has completed processing.  This is a pretty convoluted way of doing things, but I made it work.  I wish the other options above worked instead.

Hello,

For consuming API methods, the way to set the timeout is the one showed by Henrique.
I'll mark his answer as the solution, for that reason.

But it's important to understand that the timeout may happen for other reasons, and in this case, it's important to investigate better what is happening.

I will close this topic.
If you are facing problems with timeouts when calling API methods (REST/SOAP), please, open a new topic to ask for help, providing all the relevant details.

Thanks!