Hangfire xp_userlock issue

Recently, I get a lot of hangfire lock issue: bloew is lock info:

Provider 6888 2017-12-20 17:35:06.917 2017-12-20 17:34:27.203 1
81 suspended 66 LCK_M_X APPLICATION: 8:0:[HangFire:Hash:Lock]:(6fa476ec) 6.972000 0 0 0 0 6.972000 xp_userlock EXECUTE sa BACKGROUNDTASK .Net SqlClient Data Provider 6888 2017-12-20 17:35:07.217 2017-12-20 17:34:27.597 1
82 suspended 66 LCK_M_X APPLICATION: 8:0:[HangFire:Hash:Lock]:(6fa476ec) 6.952000 0 0 0 0 6.953000 xp_userlock EXECUTE sa BACKGROUNDTASK .Net SqlClient Data Provider 6888 2017-12-20 17:35:07.380 2017-12-20 17:34:28.003 1
85 suspended 66 LCK_M_X APPLICATION: 8:0:[HangFire:Hash:Lock]:(6fa476ec) 6.971000 0 0 0 0 6.972000 xp_userlock EXECUTE sa BACKGROUNDTASK .Net SqlClient Data Provider 6888 2017-12-20 17:35:07.213 2017-12-20 17:34:28.160 1
87 suspended

I want to know the root cause. how to avoid this error.

2 Likes

Guys, I too want more information on this. I was not able to locate just what the root cause of this is either.

Thanks,
Viraj

This is intended on configurations with a low polling rate (for example the current suggested config in docs), rather then every worker poll, they grab a lock in sql and the worker with the lock polls.