Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Deadlock issue in MSFlow - Update data from CDS to SQL

I have created a Flow to update the Guid(the unique identifier of CDS entity records) into an SQL Server table From CDS whenever a new record is created in CDS. The flow is working fine If I create records one by one. But If I import multiple records(around 3000 records) from SQL to CDS using Dataflows, then I am getting the below deadlock error in Flows.

"Transaction (Process ID 74) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction."

The dataflows refresh the data on a scheduled basis. So, I could not resubmit the failed runs every time.

How to get rid of this deadlock issue? Or Is there any other ways to update the SQL table?


Note: I tried the degree of parallelism(10 records), retry policy. but no use. 


Super User
Super User

Hi @kathiresans 

If you set the degree of parallelism to 1, does that make a difference? This would run more slowly, but it should also reduce the possibility of deadlocks.

Frequent Visitor

@timl, It reduced the possibility of deadlocks. But running slowly and taking more than an hour for updating 1000 records. So this won't work for me. Is there any other feasible approach that updates the records in an efficient way?

@kathiresans - Off the top of my head, I'm not sure what else to suggest. Hopefully, someone else here might have some ideas?

Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.


New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (2,121)