Function Time Out in new Retool App Builder

I’m consistently getting functions (in the new app builder) to timeout after approximately a minute, as some times they’re taking longer than a minute or two to complete (as they’re calling an AI Agent API).

There is no mention of function timeout limits in the new app builder. Are there any such timeout constraints? Can they be increased, like the classic Resource Query timeout limits?

Hi @ankurs

The maximum timeout on a function is 1 minute. If you have something that takes longer than 1 minute you should consider using an asynchronous approach and put it into a Workflow and queue that Workflow from the application. You can then for example have the Workflow write its result to a Retool table and your application could then poll the table until the result appears. This will allow you to perform long running tasks without hitting any timeouts.

If you need further details on how to do it - I can help.

Thanks

1 Like

Thanks for reaching out, @ankurs! To echo @Jon_Steele, there is indeed an immutable 60s timeout on all resource queries.

We're currently tracking potential use cases that might require something longer, but workflows can certainly fill the gap. I've recorded this feedback internally and will follow up as soon as there's any news to share! At the very least, we will make the agent aware of the timeout limitation in order to better inform the builder. :+1:

Our use case involves calling an LLM API (like Anthropic API) with a prompt - and at times, the API might take longer than a minute to respond.

1 Like

Thanks for sharing, @ankurs - I've passed this on to the team!