HangFire long job stop and restart several time

Hi, I’m trying to find why hangfire stop to run long job, it seem working 2hrs and stop
no timeout found in app pool.
is somebody have idea why the work stop ?
thank you

ASP.NET Web application (.NET Framework 4.5)
IIS server
Hangfire v1.6.17
HangFire.Core v1.6.17
HangFire.SqlServer v1.6.17

Here the behavior :

Jobs A,B,C run from 16h42 to 18H47 ( 2 hrs ) not finish

Jobs A,B,C stop from 18h47 to 2h20 ( 7hr20 )

Jobs D,E,F run from 2h20 and finish at 2h39( 20min) >>> call to the web app
Jobs A,B,C run from 2H20 to 2h39 ( 20min )

Jobs A,B,C stop from 2h39 to 7h05 ( 4.5 hrs )

Jobs A,B,C run from 7h05 to 11:56 ( 5 hrs )
*** 7h05 is a approx time somebody log to the site to watch the dashboard
*** some peoples log to site in the day

Jobs A,B,C stop from 11:56 to 13h59 (2 hrs)

Jobs A,B,C run from 13h59 finish at 15h07 (1 hrs)

Jobs A,B,C Enqueue low

Jobs D,E,F Enqueue default

I had the same problem. You are hitting hangfire’s invisibilityTimeout. You have two options.

  1. increase the timeout to more than the job will ever take to run
  2. have the job send a heartbeat to let hangfire’s know it’s still alive.

How do you implement heartbeat on job?

1 Like