Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to keep .NET 8 Hangfire application always running on IIS? #2426

Open
dedmytas opened this issue Jul 19, 2024 · 1 comment
Open

How to keep .NET 8 Hangfire application always running on IIS? #2426

dedmytas opened this issue Jul 19, 2024 · 1 comment

Comments

@dedmytas
Copy link

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.

@HernJer
Copy link

HernJer commented Jul 24, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants