Azure ASP (S2) swaps the CPU (NOT a scale out) and causes a high cpu, which causes the applications to hang.

Mark Renfrew 0 Reputation points
2025-03-26T13:32:03.3333333+00:00

The ASP appears to be "swapping" the CPU randomly, which causes a high CPU and the applications hang. We have the ASP set to a fixed number (1) at the time shown below, so this is NOT a scale out.

This also happens during the day, in which case we need to stop all the applications in the ASP, then start them again one at a time.

Question: What is the cause of this CPU swap? The tier level is S2, is Microsoft doing a hardware refresh? We cannot keep having the applications hang for no reason.

User's image

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,998 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Siva Nair 2,420 Reputation points Microsoft External Staff Moderator
    2025-03-26T22:17:44.21+00:00

    Hi Mark Renfrew,

    Lets follow some troubleshooting steps below,

    Firstly Move to High CPU analysis and check if you find any alerts or error

    Here you can see how many active apps are running in your plan. which instance or app is consuming more CPU and many other details.

    • If you find a single app is consuming High CPU then debug the app causing High CPU, Restart the bad app to mitigate the issue, scaleup the App service plan.
    • If you find multiple app consuming High CPU then scaleup the App service plan to the next tier, Isolate apps in their own ASP.User's image
    • Enable CPU monitoring to monitor all site processes
    • Mitigate the issue to avoid impact to your application
    • collect rich diagnostic data to identify root cause within code.

    Refer the below link to follow above points.

    https://azure.github.io/AppService/2019/10/07/Mitigate-your-CPU-problems-before-they-even-happen.html

    https://azure-advice.com/2020/11/03/azure-pro-active-cpu-monitoring/

    If you have any further assistant, do let me know.

    If the answer is helpful, please click Accept Answer and kindly upvote it so that other people who faces similar issue may get benefitted from it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.