Hangfire suddenly started crashing on application startup

Tags: #<Tag:0x00007faff8f24d88>

I’ve been using Hangfire for over a year now in my app. The other week it suddenly started crashing with this error:


This was not after a package update or anything. It just… died. I’ve tried deleting all the Hangfire tables from my development database and allowing it to recreate them, with no luck. The weird thing is that my production site is still running fine. However, if I point my development app at the production database, it still crashes with the same error.

I’ve also created an empty ASP.Net Core web app and added Hangfire, pointing it to my same database. It works fine.

I also tried resetting back to a git version that I know was working. It still crashes with teh same error.

I’m completely baffled here. Can anyone shed some light?

Here is some additional info because the forum refuses to let me edit my post:

I have tried removing all my custom configuration and just pasting in the bare essentials from the Hangfire tutorial page. It still crashes.

I know that my production database is fine because my production site is running fine (I haven’t deployed the crashing version of my app, obviously). But since my app crashes when I point it at that database, I know it’s definitely not a database issue, it’s a Hangfire issue.

Everything is fine in your application, and that’s not a crash – that’s just an exception that’s handled by Hangfire itself to decide what method of fetching delayed and recurring job to use. You can simple ignore that exception and tell Visual Studio to not to break on this exception thrown from Hangfire.SqlServer.dll.

:persevere: Oh goodness. I must have reset my exception settings or something. Thanks for the info!!