Transaction was deadlocked on lock resources with another process and has been chosen as the deadlock victim - RES.WorkspaceManager.DataAccess.AgentsDataAccess.TryGetAgentIdentity

Version 1

    Problem

    The following error can be found in the Windows Application Event Log of the RES Workspace Manager Relay Server

    Source: RES Workspace Manager Relay Server
    Event ID: 0
    Task Category:  None
    Level: Error
    User: N/A
    Computer: FQDN_of_Relay_Server
    Description:
    The description for Event ID 0 from source RES Workspace Manager Relay Server cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

    If the event originated on another computer, the display information had to be saved with the event.

    The following information was included with the event:

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

    Version: 9.7.4.2 (2012 SR4) CS:169416

    StackTrace:
       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
       at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
       at System.Data.SqlClient.SqlDataReader.HasMoreRows()
       at System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout)
       at RES.WorkspaceManager.DataAccess.AgentsDataAccess.TryGetAgentIdentity(IDbClient dbClient, String currentUniqueId, String previousUniqueId, Guid& agentId, Guid& globalUpdateGuid, Boolean& isLaptop)

     

    Solution

    Solved in RES Workspace Manager 2014 SR3.

    As a workaround use this query to recreate the index on tblComputers.

    drop index idxComputers_1 ON tblComputers
    drop index idxComputers_2 ON tblComputers
    drop index idxComputers_3 ON tblComputers

    CREATE INDEX idxComputers_1 ON tblComputers(ysnLaptop)
    CREATE INDEX idxComputers_2 ON tblComputers(lngPublishingType)
    CREATE INDEX idxComputers_3 ON tblComputers(strUniqueID)