Red Gate forums :: View topic - w3wp profiling appears to hang
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
ANTS Performance Profiler 8
ANTS Performance Profiler 8 forum

w3wp profiling appears to hang

Search in ANTS Performance Profiler 8 forum
Post new topic   Reply to topic
Jump to:  
Author Message
jeff.watts@ca.ibm.com



Joined: 20 Jan 2014
Posts: 2

PostPosted: Tue Jan 21, 2014 12:03 am    Post subject: w3wp profiling appears to hang Reply with quote

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?
Back to top
View user's profile Send private message
Chris.Allen



Joined: 12 Mar 2009
Posts: 588

PostPosted: Wed Jan 22, 2014 2:12 pm    Post subject: Reply with quote

Shooting from the hip, there's two things I know that might explain this.

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 Smile
Back to top
View user's profile Send private message
matt.williams



Joined: 24 Jan 2014
Posts: 1

PostPosted: Fri Jan 24, 2014 10:42 pm    Post subject: Reply with quote

I'm also experiencing the same thing. I launch our web (ASP.NET, C#) project via Visual Studio 2012 and then attach to the w3wp process in ANTS. I'm able to log in and do a few functions before the application and profiler both hang.

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.
Back to top
View user's profile Send private message
Chris.Allen



Joined: 12 Mar 2009
Posts: 588

PostPosted: Wed Jan 29, 2014 3:23 pm    Post subject: Reply with quote

I'm not sure why you can't profile using any other mode than sampling in the professional edition as you should be able to use method-level only etc- of course, don't select the option 'Attach to a .net process' use the more direct 'ASP.NET' or 'IIS' profiling option.
Back to top
View user's profile Send private message
jeff.watts@ca.ibm.com



Joined: 20 Jan 2014
Posts: 2

PostPosted: Wed Jan 29, 2014 7:46 pm    Post subject: Reply with quote

switching to using IIS profiling (I had been using attach to process) appears to help. It seems to be a little more finicky to get the profile to actually profile what I am doing. And haven't really done a long processing run yet, but it appears to be avoiding the hang now.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group