2

We are experiencing CPU peaks on sudden moments. After checking our Sitecore logs, I have noticed that there are a lot of log entries with "11:49:26 INFO HttpModule is being initialized" . As far is know this should only be initialized on the startup of the application.. And this still appear after the application was started up. Am I right? If so, where could these modules been initiliazed for the second time?

4

2 回答 2

7

当 IIS 放弃当前 Http 模块的实例并创建一个新模块时,您会看到“ HttpModule 正在初始化”消息。当 Http 模块实例超时以响应当前请求时会发生这种情况。IIS 不会一直等待会导致挂起的响应,而是尝试实例化 Http 模块的新实例并赋予其运行等待请求的控制权。

Http 模块挂起的原因可能有很多。我见过的一些最常见的问题是解决方案中没有高效的缓存设置配置,或者在每个请求上执行的昂贵逻辑等。如果这只发生在某些页面上,请调查这些页面背后的逻辑。查看缓存命中和未命中以查看可能与缓存相关的问题。最简单的方法可能是使用 .NET 分析器工具之一来查看执行页面时哪些代码花费的时间最多(我在某些时候使用过 ANTS Profiler。我相信也有免费的分析器)。

于 2014-08-24T21:46:26.220 回答
0

我发表了一篇文章解释了为什么会发生这种情况:'HttpModule is being initialized'神秘

简而言之 - 当请求到达的速度比处理速度快时可能会发生这种情况。

消息是预期的,健康的消息(数量较少)通常显示到达请求计数的峰值。

于 2020-01-21T08:50:29.373 回答