Forum Discussion

ecthomas's avatar
ecthomas
Occasional Reader
Sep 12, 2025

Mysterious Nightly CPU Spikes on App Service Plans (22:00-10:00) Despite Low Traffic

For several months now, all of our Azure App Service Plans have been experiencing consistent CPU spikes during off-peak hours, specifically from approximately 22:00 PM to 10:00 AM.

This pattern is particularly puzzling because:

  • This timeframe corresponds to our lowest traffic and activity periods
  • We've conducted thorough investigations but haven't identified the root cause
  • No scheduled timer functions or planned jobs are running during these hours that could explain the spikes

What we've already checked:

  • Application logs and metrics
  • Scheduled functions and background jobs
  • Traffic patterns and user activity

Has anyone encountered similar behavior?

What could be causing these nightly CPU spikes on otherwise idle App Service Plans?

 

 

1 Reply

  • Please try this

     

    1. Enable App Service Diagnostics
    Go to App Service > Diagnose and Solve Problems > Availability & Performance > High CPU Analysis. This tool pinpoints top resource-consuming requests and threads.

    2. Use Azure Monitor CLI
    Run:

    az monitor metrics list \
      --resource /subscriptions/<subid>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<AppName> \
      --metric "CpuPercentage" --interval PT1M

     

    This gives minute-by-minute CPU data to correlate with other logs.

    3. Profile with Application Insights
    Turn on the Profiler to capture snapshots during the spike window. Flame charts can reveal inefficient code paths or unexpected calls.

    4. Check for External Traffic
    Use Network Watcher or App Gateway logs to detect unexpected inbound traffic.

Resources