Activity method Queue vs Queue-For-Agent

We have a requirement to keep a track of all important user action in application. So on every important user action like search, update as case, advance a case we make an entry to a custom table. Our approach is to use Queue method in post processing activity and call the activity (say InsertLogs) that inserts a record in custom table.

It works fine until under normal circumstances but during high load we get few DB deadlock errors or the database takes longer time to run the merge DB script that is called from the InsertLogs activity.

Is there any better approach to handle this scenario? Can Queue-For-Agent perform better if we queue all the requests and process with a standard agent in every 2 hours or so.

***Edited by Moderator: Pallavi to update platform capability tags***


Keep up to date on this post and subscribe to comments

February 26, 2019 - 11:18am

Abikash - As you have mentioned the deadlock scenario with Queue method, you might consider optimizing the way InsertLogs activity is updating/inserting data into the table. 

As dead locks can also happen while Agent (if Queue-For-Agent is used) execution on multiple nodes. 

If you have batch nodes (node dedicated for Agents/Listeners) for background processing, I would suggest to switch the Queue-For-Agent as it doesn't affect the online user load on the node.