You're on the right track in analyzing your Azure App Service Plan (ASP) metrics, and it does look like one of your web apps is consuming more memory, which is causing critical memory errors. You might want to consider the following:
- Instance Utilization (~60-70%) – This suggests that, on average, each instance is operating at a moderate load.
- Summed Utilization (~1000-1200%) – This sum is across all instances, meaning across the 3 instances, total usage is 10x-12x, confirming that resources are fully utilized.
- Critical Memory Errors – Indicates that at least one app is hitting memory limits and potentially impacting the others.
1. Identify the app consuming the most memory
Use the App Service Metrics per app:
- Go to Azure Monitor → Metrics → Select the Web App
- Choose Memory Working Set
- Set Aggregation Type: Avg and Max
- Compare across all 6 apps to find the top consumer.
To mitigate:
Option 1: Isolate the high-consumption app
- If a single web app is consuming excessive memory, consider moving it to a separate App Service Plan to prevent resource contention.
- Deploy it on another P2V3 or higher-tier plan to distribute load effectively.
Option 2: Increase the instance count
- Scaling out to more instances (e.g., from 3 to 4-5) will distribute load better, but it won't fix an app with a memory leak.
- If the app is inefficient, scaling won't solve the core problem and may just spread the issue.
Option 3: Optimize the high-usage web app
- Check Memory Profiler in Application Insights to diagnose high memory usage.
- Optimize caching, GC settings, and reduce memory leaks in code.
To measure app-specific memory usage:
- App Service Metrics → Memory Working Set (Per App)
- Kudu (Advanced Tools) → Process Explorer
- Open Kudu (
https://<yourapp>.scm.azurewebsites.net
) - Go to Process Explorer and check per-process memory consumption.
- Open Kudu (
Effectively:
- If one app is consuming excessive memory, move it to a separate App Service Plan
- If all apps are moderately consuming memory, scale out by adding instances
- If memory usage is abnormal, investigate memory leaks or optimize app performance
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin