In OutSystems, I am consuming an external REST API. I have a client action that calls the api integration. The endpoint I'm calling takes about two minutes or more to run before returning a response.
I am consistently getting a 504 timeout error at 1 minute, with an error message from CloudFront. Everywhere I can find to set a timeout, I have set it to 600 seconds, but it doesn't seem to respect this.
In my client action, I set the Server Request Timeout to 600
In my API Method, I set the Timeout in Seconds to 600
Yet when I call this endpoint, it always times out after one minute with this error:
Is there someplace else I need to update to get the timeout to actually work?
Hi,
CloudFront has a default maximum origin response timeout of 60 seconds. See here for quotas of AWS CloudFront. https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html
So your origin behind Cloudfront CDN does not response within that timeframe thus leading to the 504 error.
Best
Stefan
Thanks for the info.
Where exactly does CloudFront come into play? CloudFront isn't involved in the API endpoint we're calling, so is it a part of OutSystems' stack? And if so, does that mean that there is no way to increase the timeout past 60 seconds if hosting your app on the OutSystems Cloud?
Just a guess. Could it be that the API you are consuming is running behind AWS API Gateway and this in turn is an origin to CloudFront to optimize edge consumption?
Iam not exactly sure, but i doubt that this message is coming from the OutSystems stack. On the other hand, i never had an endpoint which takes more than a few seconds to return something. You may open a support ticket with OutSystems just to be sure.