HangfireIO / HangfireIO/Hangfire

Jobs Stuck in Enqueued State

Open
#2,355 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
10.1k
Forks
1.8k
Avg merge
1h 19m
Merged PRs (30d)
1

Description

I realize I'm not using the latest versions of things but these _were_ the latest versions when I started having this issue in production. But due to stdump issue [IndexOutOfRangeException - What am I doing wrong?](https://github.com/HangfireIO/stdump/issues/1) I could not get a stack trace dump when I had the latest version of the packages.

ASP.NET Core .NET 6
Hangfire.AspNetCore" Version="1.8.6"
Hangfire.Console" Version="1.4.2"
Hangfire.Core" Version="1.8.6"
Hangfire.Dashboard.BasicAuthorization" Version="1.0.2"
Hangfire.Mongo" Version="1.9.12"

[stdump_hangfire.txt](https://github.com/HangfireIO/Hangfire/files/14039621/stdump_hangfire.txt)

Classes have this attribute applied: [SkipWhenPreviousJobIsRunningAttribute.txt](https://github.com/HangfireIO/Hangfire/files/14039649/SkipWhenPreviousJobIsRunningAttribute.txt)

Execute Methods have `[DisableConcurrentExecution("{0}", 3)]` applied

![image](https://github.com/HangfireIO/Hangfire/assets/12786751/62bd100b-a0a5-4973-aead-3a403b38420a)

![image](https://github.com/HangfireIO/Hangfire/assets/12786751/0efdcd63-8b6a-4857-9b89-199e38b1b3f9)

![HangfireDashboard](https://github.com/HangfireIO/Hangfire/assets/12786751/361ff71a-956f-4ddf-baa3-511f714a0ea4)

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the attached stdump_hangfire.txt and SkipWhenPreviousJobIsRunningAttribute.txt, then trace how DisableConcurrentExecution interacts with jobs remaining enqueued. Reproduce the stuck-job scenario using the listed Hangfire and Mongo versions; the issue does not define a specific fix or acceptance test, so confirm the cause and expected behavior with maintainers before changing code.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.