Forum Discussion

sanraj12's avatar
sanraj12
Copper Contributor
Dec 03, 2024

AZURE SQL DB Deadlock

I see more than 2000 deadlock everyday for my Azure SQL DB in deadlock metrics but at the end it is not causing any missing data or any transaction drop. My application not using any retry logic then how it is possible that deadlock is getting automatically resolved has no impact at all ?

1 Reply

  • It’s possible because in SQL Server (including Azure SQL), when a deadlock happens, the database engine automatically picks one of the queries as a deadlock victim and rolls it back. The other transaction goes through as normal. If your app is making the same request again right after (even without explicit retry logic), it may be doing it as part of a loop or user action, and you don’t notice the failure.

    Also, many client libraries (like ADO.NET or EF) have built-in retry behavior by default — so even if your app code doesn’t handle retries manually, the retry might be happening under the hood. That’s why you see a high number of deadlocks, but no real impact or missing data.

Resources