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?
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.
Retool is hosted in a Kubernetes Pod to have access to the data inside the VPN and then is exposed outside. The backend is in the same VPN as any other resource. I've already set the env variable and tried to follow that guide, but it seems to not have effects. I can tell you that from the Pod where Retool is hosted, I can use curl to interrogate the test endpoint I mentioned above, and it works. So the problem is present only and uniquely when the query is sent from the Retool UI. That's why I was thinking about a bug in the software.
You have done all the right steps in trouble shooting this issue, that is very odd that the curl works fine for the test endpoint but not the Retool query.
My hunch is that there must be another location in the flow that has a time limiter on it still that we can toggle to get things working.
Are you using Helm for your Kubernetes deployment as outlined in our docs here?
Hello Jack,
Yes we used the first method with Helm, using the official helm chart without any special configuration. We also tried to set the env variable you suggested above in different ways, but still nothing changed.