Seems you are referring and using:
Hangfire[
^]
public void Dispose()
{
SendStop();
if (!_bootstrapTask.Wait(_options.ShutdownTimeout))
{
Logger.Warn("Processing server takes too long to shutdown. Performing ungraceful shutdown.");
}
}
With above, your server shutdown is taking time more than configured. You should look into that on what holding to it. Most probably some thread is still actively doing some work.
You need to also assess on why Dispose is being called in case that was not intended to. You need to debug it to figure out.