Memory Management and out of memory problems

Discussion in 'ASP.NET 2.0' started by rmvanduyn, Sep 11, 2006.

  1. Hi,

    Our Application every few hours because it is exceeding the 100MB memory limit. I have added some instrumentation so that I get an email everytime the system shutdowns, and I also filter out situations when the shutdown is due to 'No HTTP request for 20 minutes.' I confirmed via tech support that the shutdowns are due to exceeding 100MB of memory use.

    Unfortunately there is no way that I can find to instrument my memory use in the real application as running on DiscountASP. In order to get this problem to occur the website has to get about 300 page views (so I assume its some kind of leak.) For example this does not happen over the weekend when page views are significantly lower. I am using OpenTracker to track pages views by the way.

    Included in the mail note to me is the memory use before the shutdown by calling GC.TotalMemorySize(false).

    The number that comes back is always between 6-15MB. But I have also have a page where I can spot check this same value and it typically runs between this value, and sometimes higher, but yet the system does not shutdown.

    Where else could the memory be leaking to if not the heap? Is there any other kind of storage that could be allocated over time and not be freed up.

    I also am doing spot checks on number of sessions and it does not seem to be related. In some cases it appears that no sessions are active when the system is recycled. (this is by examining other logs of sessions beginning and ending.) Note that I am aware that that the host also recycles the Application if there have been no http Requests for 20 minutes. I am filtering these situations out by checking the time since last request. The remaining recycles are due to exceeding the 100MB limit.

    So again how can I be using 100MB of memory when the heap only has a max of 15MB and that seems to go up and down very nicely as sessions begin and end? Where else is the memory that makes up the 100MB limit? How can I measure and understand this utilization?


    Cheers
    Mitch
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    does your application load any text file (xml, txt, etc.)? these files get loaded into memory as well.


    In addition, do you use MS Access? Same problem as with text file, when you open MS Access, it gets loaded into memory.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     

Share This Page