Gateway Timeout 504 on APIs request in apps

I'm using Retool Cloud, and we have some APIs. We want the APIs to not get a timeout for at least five minutes. We are also setting up a timeout in milliseconds as 300,000 ms. What we are noticing is, regardless of whatever timeout we set, we see a gateway timeout error from Retool's side just after 60 seconds. Is there a reason why we are seeing this error, and what should we do to resolve this error? @darren @Tess

Here is the error:

<html> <head><title>504 Gateway Time-out</title></head> <body> <center><h1>504 Gateway Time-out</h1></center> <hr><center>nginx</center> </body> </html>

@Darren @Tess someone please look into it.. this is urgent?

Hi @Ashish_Agarwal,

Yes, I am taking a look!

Thanks for your patience; I checked the logs on our side.

Retool Cloud has a 2 minute limit on resource queries, so even with the 5 minute timeout, the query will not run longer than 2 minutes. I would change the timeout setting to be the allowed maximum (120000) so that you don't run into any issues with a higher value.

In terms of the error, it looks like some queries to this resource are working, but a specific post request is hitting the Gateway Time-out error. Is that what you're seeing?

If you hardcode the values in the body, do you get the same error? Does this request work outside of the Retool environment (in Postman, for example)?