我正在努力解决一个我已经存在了几天的问题。每当我的一个网站重建或回收Apppool时,第一页会永远挂上(我只等了30分钟 ) 。 它只在~ 10 个网站中的一个特定网站发生。 它是一个 ASP.net 网站。
以下是我所观察到的:
- In IIS Manager under worker processes I can see the request. Verb = GET, Sate = ExecuteRequestHandler, Module Name = ManagedPipelineHandler. Time Elapsed just keeps increasing, of course.
- If I close down the browser in which I made the initial request and then open a new one to make another request, the page will load instantly.
- In my code the Application_Start of my Global.asax file is not called on the first request. It is called on the second request.
- The worker proccess is causing the memory usage on my machine to go through the roof
我对国际调查处的破案经验不足, 但搜寻的时间和时间让我无处可去。
我们最近在网站所做的唯一重大代码修改是,我们已开始使用log4net进行记录。 不过我试图从我的网络. config文件和Global.asax中移除任何log4net代码,但还是没有成功。
还有其他人经历过吗? 如果是,你是怎么解决的?
任何帮助都会非常感激
ADD: If I place a .txt file in the root of the site and load that as the first thing after a build it will load instantly. However the worker proccess still acts exactly as before and the memory usage still goes through the roof.
<强> 最后编辑: 强>
我觉得自己像个白痴。我无法解释原因,但出于某种原因,我在Global.asax的断点突然被击中,我能够辨别出问题。这是一个通过实体框架向数据库发出的电话,但书写得不好,即过滤是在从有关列中取出所有行之后完成的。更糟糕的是,过滤工作是在每个圆圈内完成的。不管怎样,现在一切都恢复正常了,我很高兴。