1

We have a couple of websites both installed on Windows Server 2008 R2 and IIS 7 that will occasionally hang unitl their respective application pool is recycled.

By hang I mean that the browser will try to retrieve the site, and will try loading it for a very long time, sometimes after 5-10 minutes it will start to display the web page, sometimes it shows nothing even after that time and the browser still appears ot be trying to load the web page.

The current work around is to log on to the server open IIS 7 console and recycle to worker process the website is attached to.

What causes this and how do we resolve this issue permanently?

  • 1
    I'd check database usage also. Is DB hosted on the same server? – Papa Mar 4 '15 at 1:44
2

Have you reviewed your IIS logs yet when this occurs? That may be the first place to start.

This can be caused by your application pool stopping or struggling due to too many errors. If you go to the advanced settings of your application pool, there is a Rapid-Fail protection section.

You can increase the failure interval and also the maximum failures(the amount of failures allowed in that interval), but this won't really solve your problem, but may prevent the frequency of it occurring.

Under the recycling section, you can also force the application pool to recycle automatically at specified intervals, but this can possibly cause some session data loss and reset some thing for your end users. This can also only help stop the frequency, but not the base issue of the problem.

The best thing to do is to find out why it is stopping. If this is an asp.net application, you can run a tool like elmah to log all your exceptions that are occurring in your application and work on getting those fixed.

  • I have already set the site to recycle once every 60 minutes, any more is probably too much and any less isn't enough, only because it is a WSS 3.0 website and every time it recycles it asks for users to log in again. I havenot reviewed IIS logs yet, I will go track those down and take a look. Thanks! – sec_goat Nov 25 '13 at 13:42
0

Have you checked CPU usage during the "hang"? An infinite loop in the application code will cause exactly this behavior. Unless there is I/O, locking, or sleeps in the loop, you will be able to see it from the CPU usage as you will get exactly one full core's worth of CPU usage for each infinite loop.

  • Also check w3wp.exe memory usage. If that shoots up, you know you're in trouble. – Papa Mar 4 '15 at 1:43
  • If you do caching without time or item count limits and don't change the default settings, w3wp.exe will use nearly all available memory even when running 'properly'. GC will then periodically lock things up, but it does eventually come back (I've seen lookups of a full minute, though--the more memory it uses the longer it locks up). – James Mar 4 '15 at 2:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.