Hangfire servers list shows duplicate servers

I’ve set up hangfire in an mvc app and deployed to a server.

Whenever I look at /hangfire/servers list i’ll see something like:

Server1 - Started 5 minutes ago
Server1 - Started 5 minutes ago

Two duplicate entries for the same server

and sometimes I’ll see:
Server1 - Started 7 minutes ago
Server1 - Started 5 minutes ago

Same duplicate server but with different start times.

Is this an issue? Will it affect my background tasks e.g try to fire them once from each server (even though i only have 1 server)?

I’ve followed these instructions:

And I have the Application_End - HangfireBootstrapper.Instance.Stop(); in place.

I still have the OWIN Startup.cs configured like this:

public void Configuration(IAppBuilder app)
    app.UseHangfireDashboard("/hangfire", new DashboardOptions { Authorization = new[] { new HangfireBasicAuthFilter() } } );

If I’m using ApplicationPreload and Global.asax.cs - HangfireBootstrapper.Instance.Start(), do I also need Startup.cs?
Or by having both is that perhaps the reason why I’m seeing duplicate servers started?

1 Like