Recycle of App Pool kills Kestrel but does not restart

假装没事ソ 提交于 2020-01-01 13:15:12

问题


Background

When hosting a (non-Core) ASP.net site on IIS 8+ it is possible to utilize the IIS Application Initialization Module to pro-actively initialize ('warm-up') a web application when IIS starts up (or, I believe, when an app pool is recycled). As far as I know, this is not possible when hosting a .net Core app on IIS.

I have also noticed that when hosting a .net Core (1.1) app on IIS, the dotnet.exe process (Kestrel) is killed as part of an application pool recycle event. This process is then only restarted when the first new request is made.

I'm asking the below questions because I am using Hangfire (Core) with a recurring background job and would like this job to still be executed when nobody is visiting the site for prolonged periods of time.

Questions

  1. When hosting a Core app on IIS, is there any point in using the scheduled app pool recycle functionality? The only reference I could find for this was an issue on the Github repo.

  2. If so, is it possible to automatically initialize a site or start Kestrel after a recycle of the app pool (normally this occurs every 29 hours by default).

来源:https://stackoverflow.com/questions/47509674/recycle-of-app-pool-kills-kestrel-but-does-not-restart

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!