We are leaving Russia. We are against aggression and war with Ukraine. It is a tragedy for our nations, it is a nightmare

Transaction LockMode exclusive


we are getting some deadlocks by this line
SET XACT_ABORT ON;exec sp_getapplock @Resource=@resource, @LockMode=N’Exclusive’, @LockOwner=N’Transaction’, @LockTimeout=-1;

In gthub https://github.com/HangfireIO/Hangfire/commit/915939295776b1ca5c45f413d1019ac45666c78f

say that is fixed in version 1.7 but is not working.

Can you help me?

After performing migration and applying recommended settings as written in the upgrade guide, there sp_getapplock will not be called in that query. Also, any deadlock graphs will be useful to understand what queries are being deadlocked. You can use SQL Profiler to obtain them, trace flag 1222 or use a special query on SQL Azure.