且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

ASP.NET - 回收应用程序池表示更大的问题?

更新时间:2022-05-21 22:30:44

IIS的健康监控功能使一个应用程序池自动回收。因此,一个应用程序池回收只是本身并不一定表明有问题的;它可能只是IIS的preventive功能开启。我们的想法是,如果你的应用程序有内存泄漏或忘记释放的东西,我们可以常常重新启动它的每一个提高应用程序的总体可用性,就像你会如何重新启动Windows,它已经在您的桌面上运行一个月后的许多应用小不良行为的净效应开始采取收费。

The health monitoring features of IIS enable automatic recycling of an app pool. So an app pool just recycling itself is not necessarily indicative of a problem; it could just be the preventive feature of IIS is turned on. The idea is that if your application has a memory leak or forgets to deallocate something, we can improve overall availability of the application by restarting it every so often, much like how you might restart Windows after it's been running on your desktop for a month and the net effects of small bad behaviors of many applications begin to take its toll.

在一些其他的平台,你可能不会注意到这些问题迅速,尤其是在CGI环境,因为整个框架已经建立起来,然后与每个页面请求拆除。

In some other platforms, you might not notice these problems as quickly, especially in a CGI environment, since the whole framework is set up and then torn down with each page request.

在理想情况下,你永远也不会重新启动应用程序池,不得不这样做通常是某种问题的征兆。回收的特点是一种对我们自己的失误责任保险,或那些行星正好对齐只是让是非常难以追查,重新创建,所以很少,他们可能不值得的故障排除发生错误。

Ideally, you would never have to restart the application pool, and having to do so is usually a sign of some sort of problem. The recycling feature is a sort of liability insurance against our own mistakes, or those "the planets just aligned just so" errors that are very difficult to track down, recreate, and happen so infrequently that they are probably not worth troubleshooting.