Create memory dump of Azure App Service – manual way

Open KUDU with powershell.

List all processes

Get-Process | Sort-Object {$_.Threads.Count} -Descending | Select-Object ProcessName, Id, @{n=’Threads’;e={$_.Threads.Count}}, @{n=’Memory_MB’;e={[math]::Round($_.WorkingSet64/1MB,2)}} | Format-Table -AutoSize

Select the ID with more threads – not SCM one – you can confirm it in KUDU console

go to c:\devtools\sysinternals

cd c:\devtools\sysinternals

check current logs:

dir c:\home\logfiles

Create memory dump:

./procdump.exe -accepteula -ma 9888 c:\home\logfiles

it should end with:
[12:16:21] Dump 1 initiated: c:\home\logfiles\w3wp.exe_260115_121621.dmp
[12:16:34] Dump 1 writing: Estimated dump file size is 391 MB.
[12:17:02] Dump 1 complete: 391 MB written in 41.3 seconds
[12:17:03] Dump count reached.

 

Confirm that file is here:

dir c:\home\logfiles