FlowTimeoutError Timeout running workflow

Hello Losant Team.
I have this error in my workflow
image
I was reading a topic and i understand that a workflow has a life time of 60 second and the solution is do more workflows. Is this right or the problem coud be another thing?

Thanks :slight_smile:

Hi @Jonathan_Calderon,

That is correct. What you are running into is the maximum time that a workflow can run of 60 seconds.

Generally, yes, the recommendation is to try to break things up into multiple workflows if that makes sense. There are some other things that can have a big impact on the time it takes for a workflow to run; things like HTTP requests and Function Nodes inside of Loop Nodes.

I would highly recommend that you check out our Deeper Dive on Building Performant Workflows.

Would you be able to share a screenshot of your workflow or give an explanation of what this workflow is doing? With this, I might be able to provide a more appliable solution for you.

Thank you,
Heath

1 Like

Hi Heath, how are you?

Yes, i have five HTTP Nodes and two Loops. The problem here is that i have a lot of data that i need colect. If i use another workflows this “life times” restart?
I share screenshot:
First i have a http node (Sorry for cross it out) that give me a token, then another HTTP that get a array of companys.

The first Loop contain this, the problem here is that i need take data to send in the following http node like id or other paramether that this http requiere. The Node Funcion (Format Data) only do a sum don’t worry about that. The last Node Http give me an array that contain the information that i need to save states.

So i use another loop to take data from the array and save the state of all devices that i have.

Hi again Heath jajaja. I resolved the problem with the option “Loops in paralel”. Give me a time of 38 second. I feel that is a lot of time yet so i will waiting for your recomendations about my workflow. Thanks Heat again
:slight_smile:

@Jonathan_Calderon,

Happy to hear that parallel loop runs helped, that was going to be my first suggestion.

Because I’m not totally sure how much data you’re getting or what the overall goal is for this workflow, there are a few other small things you can do.

  • If the function node is just doing a simple addition action, you can use the Math Node to skip the function node. The reason why I mentioned not using function nodes in loops is that to allow users to run arbitrary code in their workflow, we have to spin up a sandbox to allow this code to execute, which takes time.
  • if possible, consolidate the HTTP requests. While I’m not entirely sure if this is possible, I would recommend trying to consolidate your HTTP requests into as few as possible. Further, the first HTTP request to get a token, how often does that token change? If it isn’t often, you can store that token in Globals.
  • The 60-second workflow timer is on a per workflow basis. So, you can use the Workflow Trigger Output Node to trigger another workflow to start running.

Again, I would highly recommend our Deeper Dive on Building Performant Workflows, it’s exactly the perfect bit of material for what you’re looking for.

Thank you,
Heath

1 Like

Thanks for the recommendation Heath. I appreciate it :slight_smile: