Capture the deadlock details
Use the database’s deadlock report or diagnostic logs to identify statements, tables, indexes, and lock modes involved. Compare the affected transactions and their order of access instead of increasing timeouts, which do not break a circular wait.
Check whether application paths acquire the same resources in different orders or keep transactions open during unrelated work. Shorter transactions and consistent access order can reduce the chance of cycles.
Correct and validate the pattern
Where appropriate, standardize the order in which code touches shared rows or tables, and ensure indexes support the predicates used by updates. Apply changes only after confirming the engine-specific lock behavior.
Test concurrent workloads that previously triggered the issue and monitor deadlock frequency after release. Make retries bounded and idempotent so a transaction aborted by the engine does not duplicate external side effects.