Hangfire icon indicating copy to clipboard operation
Hangfire copied to clipboard

Recurring Job stuck after being considered "aborted"

Open cezar-pimentel opened this issue 5 months ago • 1 comments

Hey guys, I'm noticing a very strange behavior for a long time now.

It happened on my development environment, and I was able to reproduce the problem on my local Hangfire environment.

My HF application is using the latest version, and it is configured to run using a SQL Server database.

To reproduce the problem that's what I did on my local environment:

  1. Created a test job that runs on every minute, and it does nothing except thread sleeping for 5 minutes
  2. I put it to run, and after some seconds I manually stopped the process
  3. Then I restarted the process and went to the processing cue. In there I could see the previous triggered job "processing" but marked as aborted.
  4. Then, after 1 minute the application should trigger again (because it's configured to run on every minute) but nothing happens. The job is stuck on the aborted state forever.

The only way to make it work again is by destroying the database entirely (deleting all tables) and re-running the application, so the database gets created and everything starts working again.

Any ideas of what is going on?

Thanks!

cezar-pimentel avatar Sep 06 '24 06:09 cezar-pimentel