Open dedmytas opened 3 months ago
i have 4 instances running (DEV,QA,UAT,PROD) for over a year. The only thing i did was set IIS Start Mode = AlwaysRunning and Preload Enabled = True.
The instructions in this article have worked for me: https://dotnetblog.asphostportal.com/how-to-make-sure-your-asp-net-core-keep-running-on-iis/
Note that one item mentioned in the linked article (that’s not always listed in other articles) is that you need to install the “Application Initialization Module” in Windows. In my testing, the app pool settings and enabling “Preload” were not sufficient, but after installing the “Application Initialization Module”, my ASP.NET Core application has been running unattended successfully for weeks.
To summarize the article linked in my previous reply:
Hi,
I made a post on your forum: https://discuss.hangfire.io/t/how-to-keep-net-8-hangfire-application-always-running-on-iis/10806
tl;dr
I have a .NET 8 application running Hangfire and hosting on IIS. After some time the application shuts down (I'm guessing because it does not get any user input). This is really bad, because I have a scheduled task that needs to run daily.
I did everything in your documentation section to keep IIS app always running, but it does not work. documentation link I recycle / restart app pool, but application does not wake up, it only starts when I visit "/hangfire" endpoint.
How do I make this work? I've read a workaround about making a scheduled task to hit the endpoint every hour or something, but then why use Hangfire in the first place? I am trying to get rid of task scheduler tasks.
Please help.