简体   繁体   English

由于“ bin的更改”,阻止ASP.Net回收应用程序池

[英]Stop ASP.Net from recycling app pool due to “changes to the bin”

Greetings, I have a large .Net web app which runs on a farm of blades with the code base on a NAS. 问候,我有一个大型的.Net Web应用程序,该应用程序在具有基于NAS的代码的刀片服务器场上运行。 Every once in a while slight fluctuations in the response time of the nas cause .NET to think that something in the bin has changed and kick off a recycle of the app pool. 偶尔,nas响应时间的细微波动会导致.NET认为bin中的某些内容已更改,从而开始了应用程序池的回收。 No change has actually occurred. 实际上没有发生任何变化。 Is there a way to disable .Net's monitoring of changes to the bin? 有没有一种方法可以禁用.Net对bin更改的监视?

This will put an end to it. 这将结束它。 Now you must do iisreset to recycle your app pool. 现在,您必须执行iisreset来回收您的应用程序池。

'This is supposed to turn off the monitoring for directory deletes
'See https://connect.microsoft.com/VisualStudio/feedback/Workaround.aspx?FeedbackID=240686
'This incurs the penalty of an IISRESET or manually restarting the containing AppPool after every upgrade.
Dim pi As PropertyInfo
Dim o As Object
Dim m As MethodInfo
pi = GetType(System.Web.HttpRuntime).GetProperty("FileChangesMonitor", BindingFlags.NonPublic Or BindingFlags.Public Or BindingFlags.Static)
o = pi.GetValue(Nothing, Nothing)
m = o.GetType().GetMethod("Stop", BindingFlags.Instance Or BindingFlags.NonPublic)
m.Invoke(o, New Object() {})

There also seems to be a hot fix that appears to be able to disable the "feature" with a Registry entry: 似乎也有一个热修复程序,似乎可以禁用注册表项的“功能”:

http://support.microsoft.com/kb/911272 http://support.microsoft.com/kb/911272

Not entirely sure that this works on the bin or not. 不能完全确定这是否适用于垃圾箱。

The simple answer is, you cannot. 简单的答案是,您不能。 If IIS detects a change in one of the binaries, it must reload in order to ensure that it is using the correct binaries. 如果IIS在二进制文件之一中检测到更改,则必须重新加载以确保它使用的二进制文件正确。

The real questions are: a) Is IIS truly detecting a change, or is it due to the "fluctuation" causing the OS to think the files aren't there momemtarily? 真正的问题是:a)IIS是否真正检测到更改,或者是由于“波动”导致OS认为内存中没有文件? b) If the "fluctuations" are the root of the issue, what is causing them? b)如果“波动”是问题的根源,是什么原因造成的? How can that be addressed? 如何解决?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM