
Using Conditional Access (CA) with Azure AD B2C custom policies
July 23, 2025Call Function App from Azure Data Factory with Managed Identity Authentication
July 23, 2025A Java thread dump is a snapshot of the current state of all the threads that are part of a Java process. It provides a lot of valuable information about the Java process like its current execution point, stack trace, thread priority, and the status of the thread (running, waiting, or blocked).
Thread dumps are especially useful for diagnosing and troubleshooting performance issues, deadlocks, and unresponsive applications in a Java application. They are crucial for understanding the behavior of an application at a certain point in time and can provide insights into the application’s performance that would be difficult to obtain in any other way.
In Azure App Service, we provide ability to capture Java thread dump of your Java application by using “Diagnostic & Solve Problem”. The tool is easy to use and on board with analytical ability.
There are occasions where you cannot access “Diagnostic & Solve Problem” due to network restrictions etc., or you prefer capturing it with customized command lines. We can do the same by capturing the thread dump from kudu console in Windows App Service. The steps are:
- Go to the kudu site of your app by visiting the URL “<A href="https://.scm.azurewebsites.net/”” target=”_blank” rel=”noopener”>https://.scm.azurewebsites.net/”
- Go to Process Explorer on the Kudu site and get the PID of the “java.exe” process:
Go to Debug Console >> CMD on the kudu site.
- In the file explorer, create a folder where the dump files will be saved. In the example, I named the folder as “dump”.
In the command line, run below commands to write the dump logs to the folder while the app is executing:
jstack > dump/threaddump.txt
- Now you can find and download the java thread dump files from the same folder.
To capture thread dump on Linux app service, please refer to the blog: Collect Thread Dump and Heap Dump on Linux App Service (Java/Tomcat) | Microsoft Community Hub