We use hangfire on the production for a few months, I have upgraded to latest version last week and started to see a lot of job fetching queries on production database liek below
(@queues1 nvarchar(4000),@timeout float)
delete top (1) from [HangFire].JobQueue with (readpast, updlock, rowlock)
output DELETED.Id, DELETED.JobId, DELETED.Queue
where (FetchedAt is null or FetchedAt < DATEADD(second, @timeout, GETUTCDATE()))
and Queue in (@queues1)
We have multiple hangfire window services and multiple queues. Each window service operates only 1 queue.
Sometimes it waits more than 10 minutes in “sleeping” status on production DB. Is it normal or Do I miss something?