There are certain situations when your Java web application is not performing as you expect it to. To understand where the problem lies, you may need to profile your application and understand its behavior for different flows.
Azure App Service environment being a sandbox environment, does not support to install JProfiler and not even expose the JMX information, which can be read by Jconsole to profile your application. The way to profile you application on Azure App Service environment is by using the New Relic tool.
Follow these steps –
1. Create a New Relic APM account on Azure portal.
Make sure you select at least the Small Pro in the pricing tier.
2. Open the New Relic APM and click on the View at New Relic link as highlighted.
3. Click on Browser and Install a New Relic APM agent.
4. Select “Java” and then Download the Java agent mentioned at step 2.
5. Unzip the downloaded file and copy the newrelic folder to your wwwroot folder or any folder within your application.
6. Add the Application Settings for CATALINA_OPTS in your webapp on Azure Portal with value as
Make sure you modify the path accordingly.
7. Once your website is accessed, you should see the JVM listed on your New Relic Dashboard.
8. Using the Profile JVM link, you can profile your Java process and take thread dumps.
Sample Profiled data
Hope this helps you debugging issues with your webapp!