The Hangfire service goes out with IIS 7

I don’t understand the Hangfire service goes out with IIS even after setting AlwaysRunning in the Pool application and Time Out 0

I followed the guide below but I have a webapplication aspnet.core, but the service lasts one day and then I have to call the web application to reactivate the scheduler Hangfire that is off.

http://docs.hangfire.io/en/latest/deployment-to-production/making-aspnet-app-always-running.html

I’m desperate not know what to do

Corchi

We never managed to get it to always run. We just polled the website to keep it alive.

What are you using to poll the website Ian? We couldn’t get IIS to automatically start the application or to keep IIS from releasing resources for the site even with all the “suggested” settings set for auto start, and always running, and idle timeout of 0, etc. We have to manually access the site to get it to initially load but I created a “heartbeat” job on 4 hour intervals that makes a call to our database just to keep resources loaded. This works well for us but I am curious what other solutions others have found?

Most likely because you can’t stop IIS from shutting down your app pool after a certain period of inactivity.

You could make a hacky poll in hangfire itself, that just did a GET request to your root website every hour, but even then there’s a max-lifetime where the app pool will still shutdown.

The link you posted suggests making the app pool auto-start but I’ve never tried that. Maybe set your idle timeout to 24 hours instead of 0? You could also write a windows service (console app) that automatically started and processed the queue.