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

Cantinos 96 Reputation points
2021-01-31T18:06:05.913+00:00

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?

.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,125 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,908 questions
0 comments No comments
{count} votes

Accepted answer
  1. Cantinos 96 Reputation points
    2021-02-01T15:53:03.38+00:00

    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

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 18,366 Reputation points
    2021-02-01T14:30:49.17+00:00

    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.

    0 comments No comments