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

A flow with Apply to each takes never completes

Hey community! Need your help on this one!

 

I have a flow with an apply to each loop, making http calls for each item in the list. The whole process usually takes about 5-7 minutes to complete. I have even set timetouts on request to ensure it won't get stuck. The Flow is recurrent and runs every 5 minutes. Problem is, sometimes, the loop gets stuck forever. At least, I noticed today one instance ran for 19 hours, starting yesturday. If I cancel it and go in the run details to inspect, I see nothing running for more that a few seconds, except the global loop running time which is at 19 hours. Even the last item was processed within a second.

 

Oh and I even optimised the flow to remove any set variable, I use compose instead. I also added a safety check for running time but it's not hitting it since it's at the end of the loop itself, no further task is executed.

 

I even used FlowStudio to inspect the details and nothing took more that a few seconds to execute. It looks like a bug to me with the loop but maybe one can have a different input on that or a workaround. It's happening at least once a week and it happend twice this week already. Any idea?

 

Annotation 2019-10-17 111249.png

 

 

3 REPLIES 3
v-bacao-msft
Community Support
Community Support

 

Hi @nicolasdb ,

 

Please try setting Apply to each, and set the Degree of Parallelism to the maximum, then check if it improves your situation.

Image reference:

106.PNG

 

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi,

 

That's a good idea but unfortunately I can't activate parallelism sinc this can cause conflict as 2 tasks can update the same DevOps WorkItem at the same time. This results in an update error. I know it takes a little longer to run but it's usually not that bad!

I created a bug report with this. You can find it here: Post #388983 

Helpful resources

Announcements
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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (66,633)