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

Question

Question

deadlock on search_activity table

asked on November 5, 2021

Wanted to reach out here to see if there is anything we can do on our end to alleviate this.

We're seeing quite a large number of deadlocks on the SQL server related to pagelocks of the search_activity table.

Is there something we can configure to help that situation?

Would it make sense for Laserfiche to switch to a row level locking for these queries? There seems to be quite a lot of insert and delete statements that only affect a single row.

 

0 0

Replies

replied on January 9, 2023

We are seeing a lot of deadlocks with this table as well. Specifically, between the following queries:

Proc name: Workflow.dbo.insert_executing_activity
insert into search_activity (search_id, activity_name, context_id, parent_context_id, start_time, end_time)
		values (@internal_id, @activity_name, @context_id, @parent_context_id, @status_time, GETUTCDATE()


Proc name: Workflow.dbo.delete_search_instance
delete from search_instance where search_id = @internal_i

and these two

Proc name: Workflow.dbo.update_exec_activity_status
update search_activity 
	set close_status = @status, end_time = @status_time, work_time = @work_time 
	where search_id = @internal_id and activity_name = @activity_name and context_id = @context_id and close_status =
	
	
Proc name: Workflow.dbo.delete_search_instance
delete from search_instance where search_id = @internal_i

It looks like the delete_search_instance proc is the common issue. Workflow is currently set to "Delete completed tasks based on a timer instead of automatically... Timeout: 300 seconds and Frequency: 1 minute.

What can we do to alleviate some of these deadlocks?

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

Sign in to reply to this post.