Shouldn't all memory be freed after a page is served?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • myNameIsChris
    New Member
    • Feb 2010
    • 3

    Shouldn't all memory be freed after a page is served?

    Sporadically, I am receiving "out of memory" errors on my websites. In my performance monitor (Debug Diagnostic Tool), I can watch virtual bytes skyrocket until it causes an "out of memory" error on my website.

    What could be causing this? Even if I have piss-poor code with plenty of unclosed, un-nothing'ed objects, shouldn't the memory be freed after the page is served to the user? That is, nothing should be persisted from one page visit to another page visit. I am using no session variables.
  • JamieHowarth0
    Recognized Expert Contributor
    • May 2007
    • 537

    #2
    Hi there,

    Have you disabled all caching in IIS? Caching keeps your pages persistent in IIS' memory so that they are recalled quickly when traffic on your site is detected to be above a certain threshold (which you can alter in the metabase, I believe). However, it consumes memory to do this.
    Disabling caching means you'll use less memory but your site will have to be loaded from disk each and every time which means it'll be slower page loads.

    codegecko

    Comment

    Working...