question

Cantinos-4417 avatar image
0 Votes"
Cantinos-4417 asked Cantinos-4417 answered

Azure App Service - Cyclic (6min) high CPU - Core 3.1

Hi,

We just migrate own app from MVC 5 to Core 3.1.
No issue until we put it in production on an Azure AppService. The application freeze every 6min during few seconds.

The app doesn't contain any kind of timer job. The architecture and the environment are quite simple: MVC CORE 3.1 + SQL Azure + blob

Insight shows us cyclic high CPU peaks and storage consumption every 6min.
62119-capture.jpg
62226-capture01.jpg

In dev, we didn't reproduce this behaviour.

Do you have any solution or lead?

azure-webappsdotnet-runtime
capture.jpg (178.1 KiB)
capture01.jpg (39.9 KiB)
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.

Cantinos-4417 avatar image
0 Votes"
Cantinos-4417 answered

Thanks for your feedback. I already did what you suggest without result....
I just spent 3h with the support and we found the guilty one.... Azure Insight!

Before migration we added Insight configured on server level.
After that, we migrated our App, we had Insight configured in Code and on server lvl. and because of that invisible conflicts occurred with High CPU peaks.
Even worse, the migration to .net core5 hides Insight Azure button without disabling it.

The solution is to roll-back your App in .net4.x and disable azure Insight on server lvl. Then reconfigure your App in core5

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.

SnehaAgrawal-MSFT avatar image
0 Votes"
SnehaAgrawal-MSFT answered

Thanks for asking question! You may want to know that Azure App Service provides an intelligent and interactive experience to help you troubleshoot your app with no configuration required. When you do run into issues with your app, the diagnostics tool will point out what’s wrong to guide you to the right information to more easily and quickly troubleshoot and resolve the issue.
To access App Service diagnostics, navigate to your App Service app in the Azure portal. In the left navigation, click on Diagnose and solve problems.

62518-inkeddiagnose-tool-li.jpg



The scoping question to troubleshoot high CPU is:

  1. Are you seeing HIGH CPU on all the instances or a specific instance?

  2. Is the CPU High under the WebApp metrics or the App Service plan metrics?

  3. How many sites \ slots \ Webjobs are running in the App Service Plan.

  4. Is there a single process consuming whole of the CPU or is it combination of a few process? If it is a combination of a few processes, then simply scaling up would help.

  5. What is the size of the instance (SMALL, MEDIUM , LARGE).

You may refer to this detailed blog on deep dive on Diagnosing CPU utilization issues in Azure App Service built using any framework such as ASP.NET, Node, PHP, or Java running on a dedicated hardware tier (Basic or higher).

Also refer to below video links for troubleshooting this.

Diagnosing High CPU Part1: https://www.youtube.com/watch?v=tavdGmIX0xg
Diagnosing High CPU Part2: https://www.youtube.com/watch?v=2kewsEVn9I4

Please Let us know if you have any query on this or issue persists.



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.