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

Question

Question

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

asked on December 11, 2018

Hello everyone.

 I have been experiencing the following error in different workflows when performing a "data query": "the transaction (process ID 90) was blocked in the blocking resources with another process and was chosen as a deadlock victim" . This causes the workflow to be "terminated".

Could you help me or better proceed to open a case in support of Laserfiche?

0 0

Replies

replied on December 12, 2018 Show version history

When a query is run, any table that it interacts with is temporarily locked.  When you have multiple workflows trying to query the same table at the same time, some of the workflows may run into a deadlock condition.  If you are only doing a read, you can potentially resolve the problem by doing a custom query using nolock,

SELECT ...

FROM ...

WHERE ...

WITH (NOLOCK)

But you need to understand that using the NOLOCK can mean that the data you are retrieving can get updated at the same time you are retrieving it causing "dirty data".

1 0
replied on December 12, 2018

You can also reduce the risk of locks by optimizing your database (clustered indexes, ideal normalization) and your queries (avoid high row count queries like those that return all rows, break things into multiple smaller transactions when possible).

1 0
replied on December 11, 2018

Harol,

The issue you're experiencing actually relates to your database rather than Workflow. The message is indicating that the database server terminated the query because the resource was locked, which is beyond Workflow's control.

To address this, you will need to look at your database/query configuration to determine why is is causing a block, or try something like Simple Synchronization sequences in Workflow to prevent two processes from acting on the database simultaneously.

0 0
replied on December 12, 2018

could you explain me better the last point: "try something like Simple Synchronization sequences in Workflow to prevent two processes from acting on the database simultaneously'".

Thanks

0 0
replied on December 12, 2018

Workflow includes an activity called "Simple Synchronization Sequence"

This activity wraps around other activities and creates an in-memory lock based on a configurable identifier.

When two workflows run at the same time, the synchronization will delay one of the activities as a way to prevent conflicts over shared resources.

However, you want to be careful with these because they do consume memory and if you have a lot of instances running it could cause performance issues. 

https://www.laserfiche.com/support/webhelp/Laserfiche/10/en-US/administration/#../Subsystems/LFWorkflow/Content/Resources/Activities/Simple_Synchronization_Sequence.htm

replied on December 12, 2018 Show version history

Workflow includes an activity called "Simple Synchronization Sequence"

This activity wraps around other activities and creates an in-memory lock based on a configurable identifier.

When two workflows run at the same time, the synchronization will delay one of the activities as a way to prevent conflicts over shared resources.

However, you want to be careful with these because they do consume memory and if you have a lot of instances running it could cause performance issues.

https://www.laserfiche.com/support/webhelp/Laserfiche/10/en-US/administration/#../Subsystems/LFWorkflow/Content/Resources/Activities/Simple_Synchronization_Sequence.htm

1 0
replied on December 12, 2018

Thank you both for your answers.

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

Sign in to reply to this post.