Skip to main content
All CollectionsCommon Errors
SQL Transaction Deadlock Error
SQL Transaction Deadlock Error

SQL Transaction deadlock error explained.

Praise Magidi avatar
Written by Praise Magidi
Updated over 3 weeks ago

Message

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

Cause

A database deadlock occurs when two or more transactions are waiting for each other to release locks on resources, creating a circular dependency. In this case, Process ID xyz was involved in such a deadlock and was automatically chosen by the SQL Server as the "victim" to be terminated in order to break the deadlock cycle.

The status code 400 and error code "EREQUEST" indicate this was a client-side request error, likely due to concurrent transactions attempting to access the same resources in a different order.

Resolution

  • Rerun the flow

  • Review your transaction patterns to:

    - Access database objects in a consistent order across all transactions

    - Keep transactions as short as possible

Error Details

{
"error": {
"message": "Transaction (Process ID xyz) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.",
"code": "EREQUEST",
"number": 1205,
"state": 52,
"class": 13,
"serverName": "XXXXXXXXXXXXXX",
"procName": "",
"lineNumber": 1
},
"stepType": "Source",
"stepName": "SQLServer",
"stepid": "73b36xxxxxxxxxx",
"mapStepld": "DxiSxxxxxx",
"mapStepPath": "Dxxxxxxxx",
"mapStepType": "Step",
"module": "SQLServer",
"messageId": "678axxxxxxxxxxxxxxxxxxx",
"threadid": 1
}

Did this answer your question?