cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Logic app issue - Deadlock when writing a record

I have a Logic App that reads data from an Azure SQL table and creates a GL Journal in D365.   This works 90% of the time but every once and a while (a couple times a week) one of the entries in the journal lines will fail with this error:

 

An error has occurred.  Write failed for table row of type 'LedgerJournalLineEntity'. Infolog: Info: Cannot create a record in Journal lines (LedgerJournalTrans). Journal batch number: JBN0018064, ARR000140052.\nDeadlock, where one or more users have simultaneously locked the whole table or part of it.
 
The rest of the lines before and after the failed record write just fine.
I have tried playing with the Concurrency control (setting it to 1) but that did not help.  Someone suggested that if I included the line number in my supplied values it would fix this but I cannot figure out how to do that (it is not one of the fields available, and even if I go into code view and try it says it is not a field that can be populated).  Thanks.
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Logic app issue - Deadlock when writing a record

Hi @MarkGilbert ,

 

Could you please share the screenshot of the flow?

Could you please make sure that you don't have any other flow would run at the same time to lock the table?

 If not, I suggest that you could contact Microsoft for any help on this issue.

 

Best regards,

Alice   

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

View solution in original post

4 REPLIES 4
Highlighted
Microsoft
Microsoft

Re: Logic app issue - Deadlock when writing a record

Hi @MarkGilbert 

 

When flow actions run, they might lock the resource they are writing to as if it was a database that locks table/rows/columns. This can be related to more that one user adding records at exactly the same time so you are getting this error message. Unfortunately, Flow doesn't have a setting nor a way to fix this scenario

 

Best Regards,

Highlighted
New Member

Re: Logic app issue - Deadlock when writing a record

I am very sure that no one else , no other app or person is trying to access the journal that I am creating.

Highlighted
Community Support
Community Support

Re: Logic app issue - Deadlock when writing a record

Hi @MarkGilbert ,

 

Could you please share the screenshot of the flow?

Could you please make sure that you don't have any other flow would run at the same time to lock the table?

 If not, I suggest that you could contact Microsoft for any help on this issue.

 

Best regards,

Alice   

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

View solution in original post

Highlighted
New Member

Re: Logic app issue - Deadlock when writing a recordSc

I think I am going to call this resolved. I was looking back and it has only failed one time in the last month (ever since I set the concurrency to 1).   I think when that fail happened I assumed that the concurrency did not help but it looks like it did. I will just chalk that one fail up to a fluke.   If it starts happening regularly again I will submit another post.  Thank you.

 

Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Users online (10,996)