question

brtrach-MSFT avatar image
0 Votes"
brtrach-MSFT asked JahnaviValluri-4558 answered

Troubleshooting High CPU Usage

On one of my web app instances, we saw its CPU usage spike to about 100% for 25 minutes. None of the other instances for this web app had issues. What happened? I observed 5XX errors during the time period when viewing my site in a browser.

azure-webapps
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

JahnaviValluri-4558 avatar image
0 Votes"
JahnaviValluri-4558 answered

There are two items you can do in this instance.

The first is to setup Proactive CPU monitoring. More information can be found on that here.

The second item for an immediate resolution involves restarting the suspected "bad instance" --> Azure Portal --> App Service --> Diagnostics and solve problems Blade --> Search "Advanced Application Restart" and can select the individual suspected instances to restart.

Please note that ideally you would identify the process that is causing the CPU usage to spike. It would also be wise to collect a memory dump of your web app, and then heal the unhealthy instance as once the instance is healthy, you’ll have to wait again for the CPU to spike. More information on collecting a memory dump can be found here.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.