w3wp profiling appears to hang
jeff.watts@ca.ibm.com
Posts: 3
I am trying to profile our web application by attaching the performance profiler to w3wp.exe process. It works fine for profiling some short web service operation. But when I try to profile a longer running operation our application appears to hang. The profiler shows activity for a period of time as the operation starts. Then the activity drops to 0 (well before it should be completed). Meanwhile our application appears to be blocked or hung.
At this point I can attach to the application using VStudio (so it appears profile is no longer attached).
Running the same service operation without the profile works fine to completion.
Are there any limitations on what can be profiled? I am wondering if its an issue of our application running on multiple threads? Can that cause issues for the profiler?
At this point I can attach to the application using VStudio (so it appears profile is no longer attached).
Running the same service operation without the profile works fine to completion.
Are there any limitations on what can be profiled? I am wondering if its an issue of our application running on multiple threads? Can that cause issues for the profiler?
Comments
Firstly, the profiler generates *a lot* of data, is CPU intensive and often has it's wicked way with your code by injecting dynamic IL into it. So, now and again, profiling a long-running process just doesn't work. In such a case, you can either dial down the amount of information gathered (sampling mode is ideal for this) or profile in shorted bursts.
Secondly, we have a known issue that there's a race condition deep in the process that only seems to arise in sampling mode(!).
This is actually quite convenient since- if its failing in sampling mode, try something else; if its failing in the other mode, try sampling
Unfortunately, your suggestion re: trying something other than sampling mode isn't possible in 8.4 (Professional) as that option is set by default without the ability to change it.
In order to get around it, I tried attaching it for only certain aspects of the code that I want to profile. However, even then I could only capture 2-3 functions before I have to restart both my dev environment and ANTS.
Is there another way to profile the back end of an ASP.NET website (e.g., access controllers, factories, etc.) other than attaching to the w3wp process? Attempting the other methods results in profiling the front end (e.g., aspx) code.
Yes, thanks. Switching to IIS profiling works for me too.