NmpCore - Cannot attach to process with id ####

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.
Post Reply
gbartlett
Posts: 2
Joined: Thu Nov 01, 2012 6:46 pm

NmpCore - Cannot attach to process with id ####

Post by gbartlett » Thu Nov 01, 2012 6:53 pm

Greetings

I was looking at using your tool to diagnose an issue where an IIS worker process is consuming a large number of private bytes. I was thinking I could use NmpCore to attach to an existing w3wp.exe worker process to create a dump of memory to use in the main tool.

According to IIS the app pool is running v4.0 of .Net framework in Integrated mode.

NmpCore returns an error that it cannot attache to the process.

If I run it against the pid - I get the cannot attach error.
If I run it against the service name - it first gives the error about .Net Framework 4.0 and asing me to use /r
When I include the /r - it gives the cannot attach error.

Any thoughts on this ?

Regards,

Gary Bartlett

Andreas Suurkuusk
Posts: 1029
Joined: Wed Mar 02, 2005 7:53 pm

Re: NmpCore - Cannot attach to process with id ####

Post by Andreas Suurkuusk » Fri Nov 02, 2012 12:44 pm

Are you running the NmpCore tool under an administrative command prompt? NmpCore cannot attach to a service process unless it has administrative rights.
Best regards,

Andreas Suurkuusk
SciTech Software AB

gbartlett
Posts: 2
Joined: Thu Nov 01, 2012 6:46 pm

Re: NmpCore - Cannot attach to process with id ####

Post by gbartlett » Fri Nov 02, 2012 8:01 pm

Yes, I was signed in as the Administrator on the server when I executed the NmpCore executable.

Andreas Suurkuusk
Posts: 1029
Joined: Wed Mar 02, 2005 7:53 pm

Re: NmpCore - Cannot attach to process with id ####

Post by Andreas Suurkuusk » Fri Nov 09, 2012 1:09 pm

We have now tested attaching to the w3wp.exe process and started profiling IIS on several different platforms and using .NET Framework 2.0/4.0/4.5. However, we have not been able to reproduce a problem with ASP.NET profiling under IIS.

How are you using NmpCore to profile ASP.NET? To attach to the ASP.NET worker process, you need to run the command below (in an adminstrative command prompt):

Code: Select all

NmpCore /a w3wp.exe
or

Code: Select all

NmpCore /a <pid of w3wp.exe>
You can also start IIS under the profiler to get more detailed information. In that case you need to use the /asp command line argument. You cannot use the /svc command line argument, since more than one service is involved when profiling IIS.

Code: Select all

NmpCore /asp
Best regards,

Andreas Suurkuusk
SciTech Software AB

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 22 guests