Retool - timeout stuck at 60sec

Hello everyone,

I'm using your tool to create easy test environments for our AI tools. It works very well but I'm facing a big problem. After 60sec the call to my API automatically runs into Timeout and returns Error 504 (which also doesn't make too much sense to me). I've extended the timeout in Timeout -> Timeout after (ms) to 120000 and I think it's the max we can do, but it doesn't seem to work.
Retool is self-hosted, but I checked and I can guarantee that there are no constraints in the Pod or in the load balancer, I've set the env variable DBCONNECTOR_QUERY_TIMEOUT_MS to 120000, none of these changes has effect.
I'm also confident that the problem is not on the server side, because if I call the REST using other tools (postman or our software frontend), the error doesn't appear, and moreover I coded the server and it has all the timeout settings at 600s. Is it a bug or am I doing something wrong? Can you help me solve this?

Thank you

Hello @Simone_Grassi!

That is very odd, I haven't heard of any other users getting a 504 error using the AI tools.

Could you give me more details on the API call you are making? A screen shot of the request/query might help me better trouble shoot what the bug may be.

Is the server getting any type of error, or are you able to see the in the server logs that the request being made is coming in and reaching the server from the Retool Query?

Hello Jack,
thanks for your reply. I can give you all the details of an endpoint I created just to test this error, the endpoint just waits for 70 secs and then returns. It doesn't cause any problem, so from the backend/log I can see it properly running and terminating returning the value. So the timeout must be only from Retool side. I also underline, that if I use Postman or FastAPI docs from the same host as Retool, I don't get any timeout error."/test_timeout")
def _test_timeout() -> dict:
    t = 70 #sec"Waiting for {t} sec...")
    import time
    time.sleep(t)"I waited.")
    api_response = {
        "message": HTTPStatus.OK.phrase,
        "status-code": HTTPStatus.OK,
        "data": {"Iwaited ": t},
    return api_response

Here instead you can see the query I'm running in Retool and the timeout after 60 secs.

I hope you can help me because we were planning to intensively use Retool in my company, but this problem is currently blocking.