TAGS :Viewed: 16 - Published at: a few seconds ago

[ Sitecore HttpModules being initialized second time ]

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?

Answer 1


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).