asp.netiisworker-process

IIS Worker process hangs forever on first request


I am working on solving a problem that I have had for a couple of days now. Every time one of my sites are rebuild or the AppPool is recycled, the first pageload will hang forever (well, I've only waited up to 30 minutes). It is only happening on one particular site out of ~10 sites. It is an ASP.NET site.

Here are the things I have observed:

I'm inexperienced in troubleshooting IIS, but hours and hours of searching has led me nowhere.

The only major code change we have made on the site recently is that we have started implementing logging using log4net. I have though tried to remove any log4net code, both from my web.config file and Global.asax - still no luck.

Has anyone else experienced this and if so how did you solve it?

Any and all help will be much appreciated.

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.

Final edit:

I feel like such an idiot. I can't explain why, but for some reason my break points in Global.asax suddenly got hit and I was able to identify the problem. It was a call to a database via Entity Framework that was badly written - i.e. the filtering was done after all the rows from the column in question had been fetched. And to make it worse, the filtering was done inside a foreach loop. Anyway, now everything is back to normal and I'm happy.


Solution

  • Possibly stating the obvious but you haven't got any silly code in your global asax in the app_start that could be causing this?

    Sounds like an infinite loop or something?