cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kjordan
Helper I
Helper I

Flow Performance - What is considered an "action"? (Cross post for visibility)

Original thread - Flow Performance - What is considered an "action"? - Power Platform Community (microsoft.com)

 

Hello,

 

I am having issues with my flows hanging during a do-until loop.

 

When my flow runs properly it takes about 4-6 minutes to fully execute and the loop normally runs about 130 times. This loop is parsing a text file and converting it to a JSON file.

 

Many times I am able to get the flow to complete but then after a few successful iterations, it will start hanging and fail, or it will complete but not actually run the proper number of loops. I have set a timeout in the loop as well as a max count. The loop timer appears to not properly trigger and fail the run as I would expect.

 

Since this has been going on I am also getting an error "Your flow's performance was slow between 1/20/2021 9:29:08 AM and 1/22/2021 3:32:24 PM. It is currently performing normally. Please verify that your flow is optimized and is not using more actions or data than necessary. Learn more" and I am not sure what counts as an action.

 

Is it a step in the flow?

 

Is it possible that a step has multiple actions if it is a formulation like substrings or other string manipulations?

 

Thanks for the help,

-Kurt

1 ACCEPTED SOLUTION

Accepted Solutions

@kjordan  5 good runs means= 5*3200= 16000 executions approx. it may be higher. That is why next execution is slowing down.

Hardesh15_0-1611596557942.png

 

Thanks

Hardesh

View solution in original post

32 REPLIES 32
Hardesh15
Super User II
Super User II

@kjordan This kind of message we get when we are reaching flow defined limits. Limits are based on flow plan. To see this detail, check flow analytics tab. This tab will give you number of actions used by flow.

As per Microsoft-

"There are limits to the number of action executions a flow can make. These executions count all types of actions - including connector actions, HTTP actions, and built-in actions from initializing variables to a simple compose action. Both succeeded and failed actions count towards these limits. "

Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!

Regards,
Hardesh

@Hardesh15, I understand where the message is coming from my question pertains more to what defines the action? Is the actual "step" in the flow an action? Are the data manipulations in a "step" potentially multiple actions?

 

Also, the conditional limits I set do not appear to actually work in the flow. Setting a timeout in a do-until loop does not exit the loop as expected if the run is taking too long. I have a limit of 10 minutes set and sometimes my flows run for hours when they get stuck in the loop for unknown reasons.

 

Thanks,

-Kurt

@kjordan Flow counts action. suppose you added one compose and passing some string expression it will count this as one action. In Do until, how many times flow execute particular action it will count that executions.

 

For second part, please Share Do until screen.

Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!

Regards,
Hardesh

@Hardesh15

 

Loop image/setup

kjordan_0-1611587440750.png

 

I'm not sure I can show the whole do loop as it is rather involved with multiple conditions.

 

is this one action or multiple?

kjordan_1-1611587547393.png

text:

concat('"', substring( variables( 'fileContent' ), variables( 'headerStart' ), variables( 'midPoint' ) ), '":"', replace(replace(substring( variables( 'fileContent' ), variables( 'dataStart' ), sub( sub( variables( 'dataEnd' ), variables( 'dataStart' ) ), 2 ) ), '"',''),'\','/'), '",')
 
Thanks,
-Kurt

@kjordan In Do until condition you are using any variable which is setting your count? if this is correct. You are using 10 min delay and count limit is 135 means 135*10=1350 Min(loop Total run time). But in condition you set 133 then it means 133*10=1330Min(Total condition check run time). So your do until loop check condition till 1330 min and it will break loop after 1330Min.

Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!

Regards,
Hardesh

@Hardesh15

So they are a multiplicative condition, not an OR condition? I interpreted it as doing this for x number of times if the limit is reached break or is x minutes is reached break. Thus I need to change my logic to only allow a few seconds of time per instance based on your explanation of the limits correct?

-Kurt

@kjordan Do until logic is simple. Suppose in condition you are checking loop count value is greater than 133. And whatever you do in between no matter and in last you updated count by 1. So when first time loop will run and wait for 10 min (in your case) and later it will increase count by one(i am considering increment by 1). For one complete looping it took 10 min. Right. it will do like for your count limit 135 and if condition matched in between looping it will break loop and come out of that.

Please check your time Out time. You set this time as PT10M. it means loop will break in 10 min.

Hope you are able to understand.

Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!

Regards,
Hardesh

@Hardesh15

I believe I am understanding your logic, as mine was flawed. I was understanding the timeout as the global time and not an iterative time. I should adjust my time to a few seconds per iteration.

 

On another oddity, when I cancel a hanging flow, it appears to still run through this loop for an undetermined amount of time. Why does the cancel not abort the loop and abort the flow altogether?

Thanks,

-Kurt

@kjordan 

Pls take help from this screen.

Max count-350, Time Out-200hrs, Delay - 30 Min 

Here i am checking SharePoint column status which will get status after each 30 min. So if condition matched loop will break and if Count exceeds within Timeout loop will break.

Hardesh15_0-1611590126391.png

 

It does not immediately cancelled. it tried till run time limit. That is why you are not able to see it cancelled immediately.

Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!

Regards,
Hardesh

@Hardesh15

I attempted my flow again after adjusting the timeout value to something much smaller and once that time hits in the overall runtime it breaks the loop. I am only able to get through a small few iterations of the expected count.

Is there a minimum timeout that can be used? Is there a way to use a stopwatch to see how long a single iteration should take to complete? In theory, all I am doing is text manipulation so it should be a rather fast loop.

Thanks,

-Kurt

@kjordan Delay- The value must be between '5' seconds and '30' day(s).

As of now there is no such thing like Timer watch where you can check total time taken by single loop. Definitely you can use utcnow time at start and end of loop action which will give you total time.

Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!

Regards,
Hardesh

@Hardesh15,

Thanks for that but I am still having issues with the actual do-until timeout not breaking properly when a loop hangs for unknown reasons. I am still not sure what could be causing the hang and why some iterations seem to run for hours on a 10-minute timeout. When I changed the timeout to 10 seconds it ran for 6 iterations and 14 seconds. If I set the timeout for 10 minutes it can run for multiple hours and only complete 40 of the anticipated 130 iterations.

-Kurt

@kjordan Pls share your Do until complete screen.

Thanks

Hardesh

kjordan_0-1611592452255.png

kjordan_1-1611592468760.png

 

kjordan_2-1611592482453.png

I am not sure if I can make this more legible or not.

@kjordan Reason : you are reaching defined limits that is why it taking hours for next execution. For example i have apply to each and it is reaching to defined limit then Flow slows down execution it may execute next action after 1hr or 2hr. it does not matter how much time you have set here.

 

Thanks

Hardesh

@Hardesh15,

Can you elaborate on that a bit more?

The flow is taking a CSV with 130ish data points and parsing it into a JSON formatted data structure.

Why would there be a delay of hours between actions?

The hang-up is only in the do-until loop, all other functions operate in a few seconds.

-Kurt

 

@kjordan According to your Do until logic, it will break after defined timeout if condition is not met. If condition is met in between then it will break loop.

 

Note: you did not use any delay after condition so ideally it will executes in defined Timeout. And if you are already reaching defined limit you may see slow performance.

Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!

Regards,
Hardesh

@kjordan As analytics update next day. i will suggest you to check next day Analytics tab if it is taking too much time.

 

Thanks

Hardesh

@Hardesh15,

That would be the desired goal to either complete or break if the loop ran too long (incorrect data format) or timeout. The issue I see is that the timeout does not actually break the loop as expected from the timeout value. It appears to just run hours without reason.

-Kurt

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (82,601)