Home / ASP.NET Weblogs

Latest Microsoft Blogs

Browse by Tags

Related Posts

  • Reader email: Need help troubleshooting perf/memory issues

    I get several emails every day (through the blog) with urgent requests to help troubleshoot memory issues or memory related performance issues. Some just say “we have a memory issue, how do I troubleshoot it?” and others are far far more detailed with links to dumps and everything:) I love getting emails, but since I have a day job too (troubleshooting such issues:)) I unfortunately have to ignore most such requests through the blog:( to have time to help the customers that contact me through the normal support channels, and therefore I would recommend that if you do have a pressing issue, that you create a support case on http://support.microsoft.com/ to make sure that you get a dedicated support engineer and that your issue gets...


  • .NET Memory Leak: XslCompiledTransform and “leaked” dynamic assemblies

    I have written before about high memory usage caused by improper usage of XmlSerializer objects both in a case study and in a debugging lab .  The problem there was that every time you create a new XmlSerializer object with a non-default constructor, you generate a new dynamic assembly that contains the definition and methods for the serializer.  Since assemblies can’t be unloaded from a process unless the application domain they are loaded in is unloaded memory will keep increasing if you create new XmlSerializer objects until eventually you end up with a System.OutOfMemoryException. In the case of the XmlSerializer dynamic assemblies, they are quite easy to spot as you can look at meta-data (see previous posts) and figure out that...


  • IIS and PAE

    I recently got a question by one of my customers about PAE and IIS that I thought I’d share the answer to. Their environment looked something like this: 32bit OS (Windows 2003) IIS 6 with multiple application pools, where each app pool hosts a number of applications ~20 GB RAM They were having problems with out of memory exceptions and also with paging under high load.  They knew a lot about their application and memory usage in general, so they knew what they were using the memory for and why they got the OOMs , in this case, memory usage was relatively high per application (intentionally), but it remained stable so no leak.  With this in mind, we discussed solutions to the OOMs like splitting up the applications further etc. to avoid...


  • Tool for generating DGML graphs showing why your object can’t be collected (VisualGCRoot)

    Visual Studio.NET 2010 has a new feature that allows you to create nice directed graphs with a markup language called DGML (Directed Graph Markup Language).  Visualizing object graphs with DGML Chris Lovett wrote a tool that takes GCRoot output and transforms it to a DGML document so that you can see the roots of an object in a more visual way, and finally Mohamed Mahmoud went one step further and made a debugger extension that does this for you directly.    The debugger extension is called VGCRoot and you can get the extension, and some instructions and demos for it here . The VGCRoot extensions If you are looking at a memory dump in windbg and try to figure out why your object is still sticking around, collection after...


  • Debugging Native memory leaks with Debug Diag 1.1

    I often get questions about debugging native memory leaks. In other words, cases where you have high memory usage in your application but you can see that .net memory usage is not all that high. Recently I was helping out on such a case and this post details both generally how you go about troubleshooting these issues as well as what troubleshooting steps we went through in this particular case. Essentially you would go through these steps to troubleshoot a native memory leak: 1. Find out if your memory usage / leak is mostly .net memory or native memory 2. If it is native memory that is “leaking”, use a tool like debug diag 1.1. to track allocations and deallocations 3. Look at the main allocators and the stacks associated with the biggest...


  • Debug Diag: mscorwks.dll is responsible for 372.46 MBytes worth of outstanding allocations

    I got an email today on an issue that I think is pretty common when you try to memory leak analysis on a dump with debug diag . They had set up a leak rule in debug diag to monitor for leaks and then ran the memory analysis on it to see what was leaking and the results looked something like this:   Warning mscorwks.dll is responsible for 372.46 MBytes worth of outstanding allocations. The following are the top 2 memory consuming functions: mscorwks!EEVirtualAlloc+119 : 312.00 MBytes worth of outstanding allocations. mscorwks!EEHeapAlloc+142 : 60.46 MBytes worth of outstanding allocations. If this is unexpected, please contact the vendor of this module, Microsoft Corporation , for further assistance with this issue. So what does this mean...


  • Finding memory leaks with ANTS Memory Profiler

    I was out looking for some sample scripts for tinyget and ran across this ANTS Memory Profiler review where Scott Seely has tested it out on some of my debugging labs . I haven’t had the time and/or opportunity to test it out myself but since many people have asked me if I had used it or what I thought of it I thought I’d just point you to someone who has instead:) Have fun, Tess Read More...


  • First step in troubleshooting complex issues: Define and scope your issue properly

    Is it a plane, is it a bird, is it a UFO? Before you can delve into any kind of troubleshooting of an issue you need to thoroughly define it.  If you don’t you’ll probably end up spending a lot of time randomly gathering and looking at data that is probably not even relevant to the issue at hand.  More importantly, how do you even know that your problem is fixed if you don’t have a good definition of the problem? This might sound like common sense, but having worked with troubleshooting the better part of the last 10 years I can tell you that it is extremely common that people start looking at data before really understanding the problem.  More often than not this is because people are stressed and want to fix the problem fast...


  • Why do I see ExecutionEngineException, StackOverflowException and OutOfMemoryException on the heap when debugging .net applications?

    I came back from a long vacation today and I’ve finally caught up with enough emails to do something useful with my day. As I scanned through my blog email bucket I noticed that I had a lot of emails relating to my last post on dumping .net exceptions in windbg , and most of them asked why they see OutOfMemoryExceptions on the heap, and how to troubleshoot this. I think I have mentioned this before, but it seems like it is worth mentioning again as it is probably buried deep in some post from way back when… When you dump out all the exceptions on your .net GC heap (using !dumpheap -type Exception for example) these 3 types of exceptions will always show up, independently of what type of .net process you are debugging. 79330c30       ...


  • Background Garbage Collection in CLR 4.0

    Yesterday I found this really nice Channel 9 interview with Maoni Stephens (Dev Owner of the CLR GC) and Andrew Pardoe (Program manager for the CLR GC) where they talked about the new Background GC in CLR 4.0. She also talks about it here and there is not much value in me repeating what she already says there but basically the main points of the video and the post are: Concurrent GC is being replaced by Background GC in CLR 4.0 Concurrent GC is the mode of the GC that you use in desktop applications for example.  The goal of the concurrent GC is to minimize pause time, and it does so by allowing you to still allocate while a GC is in progress (hence the concurrent part). Concurrent GC is only available in workstation mode.  In server...


Page 1 of 5 (42 items) 1 2 3 4 5 Next >