0

I have an application running on azure app services, the application works properly but from time to time it goes very slow. Using the metrics I can see that when the application goes slow it's because the .Net process it's consuming almost 100% of the CPU time and it keeps doing until I restart the service. I don't know which functionality it's causing this behaviour and I dont have any guess.

What can I do to find out which part of my code is taking almost all the procesor time?

Are there any tool that can tell me which code is executing at a given moment?

borja gómez
  • 1,001
  • 8
  • 19
  • 1
    Try ProjectExplorer - you will get the to the stack level of each Thread. Or memory dump, that may be even faster – matcheek Jan 13 '17 at 15:48
  • Can you run it under some debugger, like VS, Windbg, gdb? Then just [*do this*](http://stackoverflow.com/a/378024/23771) when it's being slow. – Mike Dunlavey Jan 13 '17 at 17:09

2 Answers2

0

Your best bet is to take a memory dump when the process is in that state, so you can analyze it locally (e.g. in windbg or VS). To do this, go to the Process Explorer from the Kudu UI (e.g. https://[yourapp].scm.azurewebsites.net/ProcessExplorer/), right click on the relevant process and get the dump.

David Ebbo
  • 42,443
  • 8
  • 103
  • 117
-1

Try this , to check which consumes most space https://technet.microsoft.com/en-us/sysinternals/bb896653.aspx

Keys
  • 55
  • 1
  • 8