Lots of strings, lot of virtual memory, no clues...

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.
Post Reply
Posts: 1
Joined: Wed Jun 06, 2007 7:52 pm

Lots of strings, lot of virtual memory, no clues...

Post by tartarus » Wed Jun 06, 2007 8:07 pm

I'm trying to debug a c# asp.net web app (with commerce server 2003) that is throwing OutOfMemory exceptions in prod, so I guess it has a memory leak. I don't have any kind of access to prod, so I'm testing in my own environment.

I started using MS ACT to stress test the site, and I'm having most of my memory under <Other>, I read the blog and tried just attaching to the process, but still got no luck.

It doesn't seem to me that there are objects taking too much space, but I'm surprised about the number of string objects created, many thousands just for loading a page with the product details!! Anyway, most of strings are disposed.

But, the memory is still growing a lot, and after running some stress tests,
I have in Live Bytes:

Kernel.VirtualMemory: 300 Mb
Kernel.HeapMemory: 37 Mb

I'm wondering why virtual memory grows so much and if it can be related to the leak. One thing I've thought is that so many strings may fragment the space. If that's a problem, how could I debug and fix it?

Any idea about what else can I do to debug the app?


Andreas Suurkuusk
Posts: 1029
Joined: Wed Mar 02, 2005 7:53 pm

Post by Andreas Suurkuusk » Thu Jun 07, 2007 9:09 pm


When an ASP.NET page is requested, a lot of strings will be allocated. As long as all allocated strings are correctly collected, this is probably not a problem.

300MB of VirtualMemory does sound quite much. Have you looked at the details of this memory? Do you get any call stack information? The call stacks might give you a clue what's causing the high usage of VirtualMemory.

Does the memory usage (e.g. VirtualMemory) continue to increase if you allow ACT to run for a longer period?
Best regards,

Andreas Suurkuusk
SciTech Software AB

Post Reply

Who is online

Users browsing this forum: No registered users and 30 guests