I've got a site that has recently been experiencing a lot of downtime due to max memory usage. We're running a VPS with 8GB RAM, Windows Server 2008 R2, IIS 7.5, WebForms 4.0 site with SQL Express running on the same server. Usually the RAM is well under 2GB usage. I caught it in action one time ramping up quickly to max the RAM, then suddenly drop. enter image description here

We've changed a few things since then and have been ok for a few days, so maybe that issue is fixed. However, I also started logging information through Performance Counter. I found that the total requests in IIS was slowly ramping up, but then suddenly dropped. However, the ram didn't correspond to a slow increase. (The blue line is RAM, the purple line is Total Request.)

enter image description here

What would cause this request ramping up and how do I resolve it? App pool recycling? How do you limit the request length so they timeout, and is this the right approach?


Which Total request counter? From the name alone, Total Requests is the total number of requests serviced by that app.

So it'll only ever grow.

Either an AppDomain recycle (within the process) or App Pool recycle (w3wp process termination) is likely resetting the counter.

As for general advice:

  • don't run with compilation debug=true
  • consider setting a memory-based recycling trigger for the app pool
  • If RAM use is overwhelming, consider using a 32-bit app pool to naturally constrain memory use to 4GB or less (makes runaways less problematic: a process crashing when it hits its 4GB natural memory limit is easier to cope with than a process that thinks 4GB is a rounding error)

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.