How to profile memory leaks for Cloud Services classic (extended support)

hnnsj 46 Reputation points
2023-11-30T10:42:54.4933333+00:00

We are running an IoT gateway as a Cloud Service classic (extended support). A few weeks ago we had an issue where we started dropping requests, and an investigation of the metrics showed that the VM had run out of available memory. Restarting the instance released the memory again and everything started working fine. Studying the Available Memory Bytes metric graph, we noticed that the application slowly consumed more and more memory which made the VM run out of memory in about a week. When swapping in a different service, the memory consumtion stopped, so we deduce that there's a memory leak with each incoming request.

However, I am not able to find any up-to-date instructions on how to actually collect a memory dump for Cloud Services classic (extended support). The documentation is either outdated, or is not applicable to Cloud Services but only App Services.

What ways are there to collect a memory dump for analysis from a Cloud Service classic (extended support)?

What I've tried so far:

  • Analyze a few crash dumps we had collected earlier. However, the Diagnostic Analysis in Visual Studio only says it can't find any issues after running the analysis.
  • Used procdump -accepteula -r -dc "Message" -ma <PID> <PATH> and selecting the "WaWorkerHost" process. It generates a dump file but Diagnostic Analysis can't find any issues. It says that heap information is available but doesn't show any way to inspect it.
  • Used dotnet-dump collect again selecting the "WaWorkerHost" process. Again, a dump file is generated but can't find memory analysisin Diagnostic Analysis.
Azure Cloud Services
Azure Cloud Services
An Azure platform as a service offer that is used to deploy web and cloud applications.
669 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. vipullag-MSFT 25,616 Reputation points
    2023-12-08T01:11:44.6666667+00:00

    Hello hnnsj

    Welcome to Microsoft Q&A Platform, thanks for posting your query here.

    Generic ways of profiling dotnet framework applications on windows will work for Cloud Services Extended support as well.

    Hope this helps.

    0 comments No comments