Constant x in x/y Enqueued

Tags: #<Tag:0x00007efd207e5a58>

As a user of the app (non-tech) I can’t seem to get our IT to explain why I always have the 24 jobs “queued” the dashboard - but nothing in any queues. No matter if the server is restarted, been like this for years. The y value changes as jobs are queued and processed - but always 24 in x. help?
image

Solved:
The issue can be caused by a number of issues include the few listed below.

  • Data inconsistency between Hangfire tables usually Job and JobQueue
  • Incompatible edition/version of data storage it being SQL Server, MySQL etc.
  • Manually fiddling with Hangfire tables and the data stored in them.
  • Incorrect/incomplete configuration of Hangfire pipeline.

In this case it is very much likely that it is due to manual data manipulation.

Possibly dropping some of Hangfire tables and letting Hangfire recreate them.

Anyways below is how the state can restored.

Identify Enqueued Jobs

SELECT *

FROM [CreditLifeClaims].[HangFire].[Job]

WHERE StateName = ‘Enqueued’

This should return the 24 Jobs that are currently showing on the dashboard.

They are showing there because they are marked with Enqueued state.

However, Hangfire can’t do anything with them because they are linked to an empty/completed JobQueue.

Run the below statement to remove them, and then run the Job normally from the dashboard and see if the problem persist.

DELETE [CreditLifeClaims].[HangFire].[Job]

WHERE StateName = ‘Enqueued’