How to debug Azure Web App memory leaks?

Viewed 9852

There is the excellent Start Profiling button in the SCM portal that works perfect for CPU.

enter image description here

Then there are some sources that refer to a Download GC Dump button: https://stackoverflow.com/a/27987593/647845

But that doesn't seem to be available anymore.

Then there is the Download memory dump button. But for now I can't figure out how/if I can see the Type / Refcount / Size stastistics that I'm used too.

What is the recommended way to look for memory leaks in a C# Azure Web App?

5 Answers

Unfortunately the kudu support page has been deprecated. You can now find it under Diagnose and solve problems: Screenshot of the azure portal

Once you've downloaded the dump files, open them in Visual Studio and click "Collect a memory dump" like the accepted answer from Grandhali suggested.

I see this thread is pretty old, but since I had the same problem and the azure portal changes a lot during the time I want to post a little update here.

This microsoft dev blog gives a fast overview about the topic: https://devblogs.microsoft.com/premier-developer/collect-and-automate-diagnostic-actions-with-azure-app-services/

I managed to do the memory leak analysis by navigating to my App Service in Azure portal, selecting Diagnose and solve problems and afterwards the Diagnostic Tools tile. Now you should see a Collect Memory Dump tile where you can create your memory dump by configuring a blob storage to save it to.

Afterwards I downloaded the dumps and used Visual Studio to analyze the issues.

Related