Tess Ferrandez ASP.NET Escalation Engineer Microsoft Session Code: WIA402 Problem types Hangs and performance issues Memory leaks and high memory usage Crashes Exceptions.
Download ReportTranscript Tess Ferrandez ASP.NET Escalation Engineer Microsoft Session Code: WIA402 Problem types Hangs and performance issues Memory leaks and high memory usage Crashes Exceptions.
Tess Ferrandez ASP.NET Escalation Engineer Microsoft Session Code: WIA402 Problem types Hangs and performance issues Memory leaks and high memory usage Crashes Exceptions Tools and Resources WinDbg.exe and adplus.vbs (Included with Debugging Tools for Windows) SOS.dll (Included with .NET framework) Debug Diagnostics 1.1 Tinyget.exe (Included in the IIS Resource kit) Microsoft Visual Studio .NET 2010 Blog: If broken it is, fix it you should http://blogs.msdn.com/Tess Hangs and performance issues Idle hangs Waiting for external resources Waiting for locks/sync objects Busy hangs CPU Intensive operations High CPU in GC Application restarts Step-By-Step 1. 2. 3. 4. Reproduce problem Look at perf data (CPU Usage etc.) Get a memory dump (or two) Examine threads a) (Idle) Find blocking calls or calls to external resources b) (Busy) Look for active threads Memory leaks and high mem. usage Managed (.NET) Cache / Session Heavy Large Object Heap (LOH) usage Blocked finalizer GC heap fragmentation (pinning) Loader heap issues Dynamic assemblies Lots of apps in one app pool Step-By-Step 1. Look at perf data (.NET / Native or Loader heap issue) 2. Get a memory dump (or two) 3. Check if the finalizer is blocked 4. Dump the .NET GC Heap and determine where the memory is going 5. Dump objects, or !gcroot them to see why they are not being collected Crashes OutOfMemoryException StackOverflowException ExecutionEngineException .NET and Native Heap corruption Unhandled exceptions Recycling Exceptions Tracing exceptions Dumping on exceptions Step-By-Step 1. Check Event logs 2. Disable Recycling 3. Set up a Debug Diag rule to capture dumps on exceptions or crash 4. Reproduce 5. Look at stacks/exceptions in the dump (and/or in log files) Resources www.microsoft.com/teched www.microsoft.com/learning Sessions On-Demand & Community Microsoft Certification & Training Resources http://microsoft.com/technet http://microsoft.com/msdn Resources for IT Professionals Resources for Developers Track Resources Blogs: http://blogs.msdn.com/tess http://blogs.msdn.com/johan http://blogs.msdn.com/carloc http://blogs.msdn.com/debuggingtoolbox/ http://www.wintellect.com/cs/blogs/jrobbins/default.aspx http://blogs.msdn.com/profiler/ Tools: Debugging tools for windows Tinyget – IIS Resource Kit Debug Diag 1.1 Microsoft Visual Studio .NET 2010 Red Gate .NET Reflector Complete an evaluation on CommNet and enter to win an Xbox 360 Elite! © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.