What could cause a sustained increase in CPU for Azure App Service Plan

Graham 86 Reputation points
2025-07-30T16:17:11.4333333+00:00

On Tuesday morning Azure automatically restarted my App Service Plan. The plan only has one app running in it and was typically using around 8% CPU except for occasional spikes during deployments. After the restart the CPU usage for the plan has doubled to 16%. The app code wasn't updated or redeployed and no settings on the plan were changed. The CPU Time metric for the individual app also appears unchanged.

Is there a way to determine if there are other processes running on the Linux instance that could be using additional CPU? How should one go about diagnosing this since it appears it's occurring outside of our application?

Thanks!

Azure App Service
Azure App Service

Azure App Service is a service used to create and deploy scalable, mission-critical web apps.

0 comments No comments

Answer accepted by question author
Divyesh Govaerdhanan 11,725 Reputation points MVP Volunteer Moderator
2025-07-30T23:55:34.71+00:00

Hello,

Welcome to Microsoft Q&A,

The possible causes could be,

Platform Updates or Host Reallocation

Azure periodically restarts underlying VMs for OS patching or host maintenance.

Your app might have moved to a new host with different resource utilization characteristics.

These can affect CPU usage even if your app hasn't changed.

Noisy Neighbors (Shared Infrastructure)

  • In shared environments (especially lower tiers), other apps running on the same worker VM can affect CPU availability.
  • While App Service uses resource governance, performance may still vary subtly post-restart.

Change in Azure Runtime or Dependencies

  • Platform-wide updates to App Service Linux workers (e.g., .NET Core version patches, Node runtimes) could impact runtime behavior or background processes.
  • This includes changes to diagnostic agents or site extensions.

Zombie or Orphaned Worker Processes

  • In some edge cases, zombie processes or orphaned tasks (e.g., stuck background jobs, duplicate web workers) may spin post-restart.

To Diagnose,

Check App Service Metrics

  • Go to your App Service Plan → Metrics in the Azure portal.

Add metrics for:

CPU Time

  Memory Working Set
  
     HTTP Queue Length
     
        Process Count
        

Compare pre- and post-restart trends. If only the plan-level CPU increased but the app-level CPU stayed flat, it's likely external.

Enable and analyze Application Insights Profiler or Snapshot Debugger to identify inefficient methods or CPU spikes.

Please Upvote and accept the answer if it helps!!

Was this answer helpful?


0 additional answers

Sort by: Most helpful

Your answer

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