You are viewing limited content. For full access, please sign in.

Question

Question

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

asked on September 12, 2018

Hello everyone, I have the following error:

In a workflow, it executed a query data, however in a specific instance the flow was terminated and the following error message appears:

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

They know why it can be presented and how to solve it?

Thanks

0 0

Answer

SELECTED ANSWER
replied on September 13, 2018

This error is actually originating with your SQL server and not within workflow. For me, I have run into this when I have many workflows using the same datasource that end up running at/near the same time. For instance, I had workflows that ran a database insert after forms were being submitted. My forms routing service had an error at some point, and I ended up restarting it, which triggered 5 or 6 queued instances of the form to submit essentially at the same time. I saw this deadlocking error on 2 of those instances.

There may be some SQL configuration or modifications to your query that you could try to alleviate the problem. Typically, SQL uses Table Locking, which means that when a resource is writing to a table, it temporarily locks the entire table until the transaction is complete (this is for only update/insert/delete statements, not select). You can try to use Row Locking instead, which causes the database to only lock the rows that are actively affected by the transaction you are running, but does not prevent other operations that may write to the same table. One way to do this would be to use a Custom Query activity and try using the hint "WITH (ROWLOCK)" to force row locking.

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.