Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hangfire Dashboard ignores configured heartbeat timeout, and always reports aborted jobs after 1 minute #2499

Open
tysonstolarski opened this issue Feb 5, 2025 · 0 comments

Comments

@tysonstolarski
Copy link

We've configured our Hangfire servers with a 2 minute heartbeat, and 10 min server timeout:

void DefaultOptions(BackgroundJobServerOptions options)
{
    options.SchedulePollingInterval = TimeSpan.FromMinutes(5);
    options.HeartbeatInterval = TimeSpan.FromMinutes(2);
    options.ServerTimeout = TimeSpan.FromMinutes(10);
    options.ServerCheckInterval = TimeSpan.FromMinutes(10);
}

However we're now getting aborted job warnings in the dashboard:

Image

It looks like this is just a red herring though. The job is not actually aborted. The UI is reporting any jobs with server heartbeats more than 1 minute ago, regardless of Heartbeat/ServerTimeout settings.

I think the code here needs to be tweaked to actually factor in the ServerTimeout value, rather than 1 minute hardcoded:
https://github.com/HangfireIO/Hangfire/blob/main/src/Hangfire.Core/Dashboard/Pages/ProcessingJobsPage.cshtml#L114

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants