145
Views
8
Comments
Solved
Preparation timing out after hitting POST API twice
Question

My Outsystems screen is timing out on a post api.

I'm hitting a POST API twice in the preparation. The API is working fine in python, and each hit works fine on its own in outsystems, however for some reason when i put two posts in one preparation it seems to crash on the second.

Any ideas why this could be happening?

2018-10-15 13-43-39
Joseph Palmer
Solution

Hi Marco.

In the end, the solution we came up with was to adjust the format of our API post, and simply pass out a concatenated string of our requests. 

We could not get it to complete multiple posts, not sure why, it just would time out on the second request, even if we switched the order of the requests. I tried debugging it and it would simply hit the post and then timeout.



2023-07-28 17-00-32
Marco Arede
 
MVP

Hi Joseph Palmer,

I'd suggest to follow OS best practices, simplify your preparation, see more info here:

https://success.outsystems.com/Documentation/Best_Practices/Performance_Best_Practices/Performance_Best_Practices_-_Logic

Cheers!

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Joseph,

Have you debugged the Preperation? What happens when you call the second API? Does it also timeout when debugging?

2023-07-28 17-00-32
Marco Arede
 
MVP

Hi Joseph Palmer,

Were you able to find causes and solve the API requests timeout?

Cheers!

2018-10-15 13-43-39
Joseph Palmer
Solution

Hi Marco.

In the end, the solution we came up with was to adjust the format of our API post, and simply pass out a concatenated string of our requests. 

We could not get it to complete multiple posts, not sure why, it just would time out on the second request, even if we switched the order of the requests. I tried debugging it and it would simply hit the post and then timeout.



2023-07-28 17-00-32
Marco Arede
 
MVP

Hi Joseph Palmer,

Good to know this topic was solved. As future reference about this subject, it's important to have simple preparation logic (mentioned in the best practices). Not only to avoid timeouts, but (more important) to improve user experience. I'd suggest you can mark your topic as solved.

Good luck for your developments!

2018-10-15 13-43-39
Joseph Palmer

Marco Arede wrote:

Hi Joseph Palmer,

Good to know this topic was solved. As future reference about this subject, it's important to have simple preparation logic (mentioned in the best practices). Not only to avoid timeouts, but (more important) to improve user experience. I'd suggest you can mark your topic as solved.

Good luck for your developments!


Hi Marco, this makes sense, and I agree with the value of having simple preparations.

In this instance, the preparation was simple. The issue seemed to be relating to hitting the API twice on the Outsystems side. We tested it in python and the API responded very quickly, however when we tried to do it in OS it seemed to timeout on the second request. 

Perhaps there's an issue relating to how outsystems queues it's API posts? I would assume that Outsystems only runs the second post once the first request has received its response? If this is the case, then i'm not sure what the issue was at all.


2023-07-28 17-00-32
Marco Arede
 
MVP

Hi Joseph Palmer,

In OutSystems, the flow of actions is sequential. The second request is executed only after the first one is completed.

What could have been different from your Python implementation?

2023-07-28 17-00-32
Marco Arede
 
MVP

Hi Joseph Palmer,

I'd suggest to close this topic.

And in case you have more details, it's always interesting to know why that happened.

Regards and good luck!

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