Base solution for your next web application
Open Closed

Hangfire stopped working #6995


User avatar
0
aquasource created

Hi,

We have just one Hangfire job running on our website, running every hour on the hour. For some reason it has stopped running and I cannot reproduce the problem in development.

In the logs I see the following: DEBUG 2019-05-11 14:16:47,841 [88 ] Abp.Modules.AbpModuleManager - Shutting down has been started DEBUG 2019-05-11 14:16:47,843 [88 ] bp.Hangfire.HangfireBackgroundJobManager - Stop background worker: Abp.Hangfire.HangfireBackgroundJobManager DEBUG 2019-05-11 14:16:47,844 [88 ] bp.Hangfire.HangfireBackgroundJobManager - WaitToStop background worker: Abp.Hangfire.HangfireBackgroundJobManager DEBUG 2019-05-11 14:16:47,844 [88 ] Abp.Modules.AbpModuleManager - Shutting down completed. INFO 2019-05-11 14:16:47,873 [88 ] Hangfire.BackgroundJobServer - Hangfire Server stopped.


5 Answer(s)
  • User Avatar
    0
    ryancyq created
    Support Team

    Hi, looks like your app is shutdowning, therefore abp modules are getting disposed. Have you configured your app to be always alive ?

  • User Avatar
    0
    aquasource created

    Do you have a link as to how that can be done in Core?

  • User Avatar
    0
    ryancyq created
    Support Team

    you can refer to this for IIS and hangfire configuration.

  • User Avatar
    0
    aquasource created

    According to this link (which is written for older ASP.NET), "It is not necessary for ASP.NET Core, because application is exposed by a console application that it already always on." Could there be another reason for the problems we are having?

  • User Avatar
    0
    ryancyq created
    Support Team

    It is not necessary for ASP.NET Core,

    It doesn't differ whether you are using asp .net or asp .net core, application hosting will be the main factor to decide whether your application should be sleeping/suspended

    because application is exposed by a console application that it already always on

    I don't quite understand the scenario, can you provide more details?