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…

7

Debugging a classic ReaderWriterLock deadlock with SOSex.dll

I was helping out on an issue the other day where the process would stall if they added enough users in their load tests.  Btw, serious kudos to them for making load tests, so much nicer to work with a problem in test rather than when it is getting critical on a production machine. We…

3

High CPU in .NET app using a static Generic.Dictionary

A couple of weeks ago I helped out on a high CPU issue in an ASP.NET application. Problem description Every so often they started seeing very slow response times and in some cases the app didn’t respond at all and at the same time the w3wp.exe process was sitting at very high CPU usage 80-90%. …

29

.NET Hang Case study: The danger of locking on strings

I had an interesting case today where an asp.net app was stuck in a true deadlock.  In other words two threads were both waiting for resources that the other thread owned. The scenario in these cases usually goes something like this: FunctionA (locks on ResourceA) and calls FunctionB where it needs ResourceB FunctionB (locks on…

6

ASP.NET Case Study: Hang when loading assemblies

The other day I came across an issue where an ASP.NET site stopped responding and didn’t start serving requests again until the W3WP.exe process was restarted. We grabbed some memory dumps with debug diag before restarting the process to see what was going on. Debugging the dumps: I opened the dump in windbg, and loaded…

3

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…

9

A case of lost session variables when using out of process session state

Recently I had a case where the customer had an issue with session variables.  The claim was that if they use in-proc session state their session variables would work just fine, but if they changed the session mode to stateserver in web.config their sessions were lost. <sessionState mode=”StateServer” cookieless=”UseCookies” stateConnectionString=”tcpip=127.0.0.1:42424″/> When looking at bit closer…

0

First look at debugging .NET 4.0 dumps in Visual Studio 2010

I know that for a lot of you this is a bit far into the future, but I thought it would be nice to run through a few of my lab scenarios to show off some of the new features in Visual Studio 2010.  I am sure that I will miss a bunch of cool…

14

Neat .NET 2.0 StackViewer to troubleshoot hangs/performance issues

Bret wrote a post about Managed Stack Explorer, a really nice tool that was developed in 2006 but since then seems to have been forgotten. It’s excellent if you want to troubleshoot hangs/performance issues in a process but don’t want to go through the hassle of getting and analyzing a dump.   What it will do…

13

Developers are from Mars, Ops people are from Venus… or It looked good on paper

A few weeks back me and Micke (one of our Architect Evangelists) had a session at TechDays where we talked about “things that looked good on paper” i.e. things that sound pretty ok in the design/development phase but sometimes turn out to be a disaster in production. We are both pretty passionate about making the…

19