The article describes how to collect a memory dump of a process that is run inside a Sitecore Managed Cloud container in a non-production environment.
Note: To collect a memory dump in a production environment, contact Sitecore Support.
Notes:
- Collecting a memory dump might impact the pod and its availability.
- You must check that the free space on Submit Queue persistent storage is sufficient for copying the dump file.
To collect a memory dump:
- Download the Sysinternals Suite for Nano Server found on the following page and then unpack the archive to your local folder:
https://docs.microsoft.com/en-us/sysinternals/downloads/sysinternals-suite
For example, unpack it to C:\ProcDump
- Copy the procdump64.exe tool to the Sitecore Managed Cloud container (see How to copy files to/from a container)
Change the directory to your local folder, for instance to:
cd C:\ProcDump
Copy the binary file to your pod, for example:
kubectl.exe cp procdump64.exe sitecore/cd-76495d74d-x5bmn:procdump64.exe
- Connect to your Sitecore pod by running the following commands:
kubectl exec -it "pod_name" -n "namespace" -- powershell
For example:
kubectl.exe exec -it cd-76495d74d-x5bmn -n sitecore -- powershell
- Run a PowerShell session within the container (see How to run PowerShell in container) and run the following command to find the required ID of the process:
(Get-Process | where -Property ProcessName -eq "w3wp").id
- Execute procdump as the Sitecore Support engineer has instructed you to do, with on-demand or conditional collection of it:
.\procdump64.exe -ma <w3wp PID> -accepteula
For example:
\procdump64.exe -ma 5688 -accepteula
\procdump64.exe -ma 5688 -accepteula -c 80 -s 5
- After a successful dump collection, exit from the PowerShell session inside the container.
- Download the collected dump from the container to the local file system:
- Zip the dump and upload the zipped archive file to Sitecore Support SharePoint Storage.