当我们部署我们的Web应用程序,我们复制所有code到一个新的目录,然后指向IIS到新目录中。当我们做到这一点的AppDomain数的增加,但从来没有减少。此外,我们的Application_End事件似乎永远不会触发。
When we deploy our web application we copy all the code to a new directory and then point iis to that new directory. When we do this the number of appdomains increases but never decreases. Also, our Application_End event never seems to fire.
有关一些未知的时间,而应用程序域的两个集都尚通过性能监视器报告,系统执行很差GC中尖峰为100%,而%的时间。最后,我回收应用程序池来获得应用程序流畅运行再次
For some unknown time, while both sets of AppDomains are still reported by perfmon, the system performs very poorly while % time in GC spikes to 100%. Eventually I recycle the app pool to get the app running smoothly again.
附加一块信息:列出的AppDomain我开发的机器上显示2,但4现场服务器上运行......我们只是在池中运行一个应用程序所以这意味着我们使用一些库创建应用程序域。
我应该怎么做,以尝试调试发生了什么?什么会prevent一个应用程序域卸载从
What should I do to try to debug what's happening? What would prevent an app domain from unloading?
更新2014年9月3日
在得到它看起来像问题的一些更详细的日志信息并非酒店周围的老应用程序域,它的重新启动过程中创造了新的应用程序域。相反入手一部新实例的应用程序,它启动两个。有时候,我们从旧的实例application_end得到,有时候我们不知道。
After getting some more detail log information it looks like the problem is not old app domains staying around, it's new appdomains created during restart. Instead of the application starting one new instance, it starts two. Sometimes we get application_end from the old instance, sometimes we don't.
更新2014年9月4日
这两个事情正在发生。使用进程管理器,我可以看到,旧的应用程序域仍然存在,一个新的开始的机器之一。在其他计算机上,只有2应用程序域,但有他们的顺序ID的差距。于是两个实例开始(我们也得到应用开始的日志消息),其中一人离开了人世几乎是瞬间,留下2应用程序域。
Both things are happening. Using process explorer I can see on one of the machines that the old app domain is still there and a new one has started. On the other machine there were only 2 app domains but there was a gap in their sequential ids. So two instances started (we also get a log message from app start), one of them died off almost instantly, leaving 2 app domains.
推荐答案虽然我不知道这是唯一的原因,应用程序不卸载应用程序域,它肯定是一个原因。实际的答案是有趣的要少得多比我以前的步骤看着办吧。
Although I am not sure this is the ONLY reason the app was not unloading appdomains, it certainly is one reason. The actual answer is much less interesting than the steps I used to figure it out.
更多推荐
ASP.NET Web应用程序不卸载部署后的AppDomain
发布评论