Calling function or workflow recursively

  1. Execute recursive process.

  2. Regular workflow function was working months ago. Now it times out before ten minutes even though everything is fine and we want the total run time to span like twenty minutes.

  3. I went ahead and started making a separate workflow to do the same task as the workflow. I triggered it about a day ago with bugs and it looks like its calling itself in an infinite loop every two minutes. The cancel button says I can’t cancel it because it was called from the context of another workflow or app…

  4. Ideally the regular recursive workflow function will just start working again.

    Thanks Retool Teams!

Summary

A recursive workflow (function) on Retool Cloud that once ran for the desired ~20 minutes now times out in under ten minutes, and a replacement workflow is stuck calling itself in an infinite loop every ~2 minutes that can't be canceled because it was triggered 'from the context of another workflow or app.'

AI Response

The early timeout is expected behavior rather than a regression: a workflow invoked by another workflow (via a Run Workflow block) is capped at a 3-minute timeout, and synchronous webhook/classic-app triggers only get 15 minutes to reach a Response block—only asynchronous runs can span the full duration (up to 30 hours). To reach a ~20-minute total runtime, restructure so the long-running work executes asynchronously (place a Response block early so remaining blocks run async, or trigger the heavy job asynchronously) instead of relying on a nested/synchronous recursive call. For the runaway self-triggering loop, the reliable way to break it is to remove or disable the trigger that re-invokes it (e.g., turn off the schedule/webhook or the block that calls it) so no new iterations are queued, then let the in-flight run expire; add a guard/branch condition to the recursion so it stops when its exit criteria are met.

Sources

:bookmark: Workflow timeout limitation "The workflow run exceeded the timeout of 900000 ms"
Solved thread explaining Retool's workflow timeout limits and how to architect long-running/multi-workflow ETL jobs around them, directly mirroring the sub-ten-minute timeout seen here.
:bookmark: How to stop workflow that is running recursively?
Solved thread on halting a workflow stuck in a recursive/infinite loop by disabling its trigger, matching the uncancellable self-calling workflow.

The Community Team is testing out a new automation. Let us know if it's helpful (or not) by leaving a :heart:, :+1:, or :-1:. Or by marking this post as the "Solution"! Let us know if you have any feedback here. :rocket: