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?
-
1We see these entries also, I do not have an answer but if one where to start an investigation the Sitecore scheduling system would be my guess. For a simple approach you could check if there is an alignment with the httpModule Initialized and the scheduling job messages, or try disabling scheduling for a period. – Jan Hebnes Aug 22 '14 at 11:53
2 Answers
You see "HttpModule is being initialized" messages when IIS abandons an instance of current Http module and creates a new one. That happens when Http module instance times out to respond back on current request. Instead of perpetually waiting for the response which would cause a hang, IIS makes an attempt to instantiate a new instance of Http module and give it control to run awaiting requests.
There could be many reasons why Http module hangs up. Some of most common I've seen is not efficient caching settings configuration in your solution or expensive logic that gets executed on each request etc. If that happens only for certain pages, investigate the logic behind those pages. Check out cache hits and misses to see it that could be a caching related issue. The easiest way could be to use one of the .NET profiler tools to see what code takes the most time when page gets executed (I used ANTS Profiler at some point. I believe there are free profilers too).

- 353
- 1
- 10
I've published a post explaining why that happens: 'HttpModule is being initialized' mystery.
In a few words - that may happen when requests arrive faster than being processed.
Messages are expected & healthy ones (in low numbers) usually showing a spike in arriving requests count.

- 523
- 2
- 16