重新启动服务器IIS 8.5后如何重新启动Hangfire服务器 [英] how to restart Hangfire server after reboot server IIS 8.5

查看:123
本文介绍了重新启动服务器IIS 8.5后如何重新启动Hangfire服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Hangfire在我的应用程序中创建了一个带有blazor服务器端和调度程序的webapp.它托管在Windows Server 2012的IIS 8.5中.

I created a webapp with blazor serverside with a scheduler in my app using Hangfire. It's hosted in a IIS 8.5 on windows server 2012.

我已经进行了所有设置,以确保我的blazor应用程序不停止且不回收(idle = 0,startmode,Regular Time Interval ...),因此sheduler始终在运行.而且一切正常.

I already did all the settings to make sure my blazor app dont stop and dont recycle (idle=0,startmode,Regular Time Interval...) so the sheduler is always running. And all work good.

但是,如果有任何服务器重新启动,我需要重新启动Hangfire服务器以重新启动应用程序内的sheduler(只需在浏览器中对URL进行一次ping操作)...

But if there is any server reboot, i need to restart my Hangfire server to restart the sheduler inside the app (just with single ping of the url in a browser)...

就像我们在屏幕上看到的一样,直到我在浏览器中ping blazor的URL之前,hangfire服务器才启动...

Like we can see on the screen, the hangfire server dont start until i ping my blazor's URL in a browser...

推荐答案

我认为这主要是IIS,您想要的是将IIS中的应用程序池"设置为AlwaysRunning,而不是在Windows上启动工作进程.IIS启动后,第一个Web请求将启动工作进程.

I think this is primarily an IIS thing, and what you want is to set the Application Pool in IIS to AlwaysRunning, so instead of starting up the worker process on the first web request it starts the worker process as soon as IIS starts.

查看此 SF答案

这篇关于重新启动服务器IIS 8.5后如何重新启动Hangfire服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆