How to identify why my .net Web App is occasionally slow due to high CPU time

MeganB 0 Reputation points
2025-03-20T13:31:47.9633333+00:00

I have a Web App running an .NET application. A few times a week, the response times increase significantly from the norm and I can see high CPU usage.User's image

I have Application Insights enabled along with application logging.

User's image

What's the best approach for identifying the root cause of the sudden increase in CPU and response times?

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

1 answer

Sort by: Most helpful
  1. Alekhya Vaddepally 665 Reputation points Microsoft External Staff
    2025-03-21T10:00:34.35+00:00

    Hi MeganB,

    you already enabled application insight for application logging you can also identify the root cause

    you can analysis performance trend in application insights with following key metrics like average response time, CPU usage and failed requests

    check the application insights for long running query, slow http requests also cause for high CPU usage

    you can also enable application insight profiler for deeper analysis it helps to capture periodic snapshots of code execution during high CPU periods.

    Use Live Metrics Stream to Monitor Real-time CPU Usage
    https://learn.microsoft.com/en-us/previous-versions/azure/azure-monitor/app/search-and-transaction-diagnostics-redirect?tabs=transaction-search
    https://learn.microsoft.com/en-us/azure/azure-monitor/profiler/profiler
    https://learn.microsoft.com/en-us/azure/azure-monitor/app/app-insights-overview
    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.

    Let me know if you have any further Queries.

    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.