Multiple Web apps on a App service plan

ReCloudS 40 Reputation points
2025-03-05T13:28:00.95+00:00

Hi ,

I have a question on monitoring regarding on the Azure App service plan , my question is I have deployed 3 web apps and 3 function apps on azure app service plan which the service plan is P2V3 and the instance count is 3 meaning the each app/fun is getting shared on all the 3 instances when am checking the metrics for the app service plan , the max it says is ~60-70% for the time period of 30 days , when am checking for sum it was showing as ~1000-1200% for 30 days , it means that the whole apps are consuming what they got allocated. And I suspect that one web app is consuming more memory as I also observed the critical error for the memory in diagnose and solve problems of that web app , so I need a suggestion here whether am on the right way of looking at it ? if yes ? whats the suggestion to isolate the app with diff app service plan or shall I just increase the instance count to even more ? and also help me with how much the apps are consuming how much memory?User's image

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,434 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Marcin Policht 38,000 Reputation points MVP
    2025-03-05T13:35:17.95+00:00

    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:

    1. App Service Metrics → Memory Working Set (Per App)
    2. Kudu (Advanced Tools) → Process Explorer
      • Open Kudu (https://<yourapp>.scm.azurewebsites.net)
      • Go to Process Explorer and check per-process memory consumption.

    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


  2. Bhargavi Naragani 1,375 Reputation points Microsoft External Staff
    2025-03-06T20:22:01.98+00:00

    Hi @ReCloudS
    In addition to @Marcin Policht response, and after addressing your concern.

    You are correct, under a P2V3 configuration (16GB RAM per instance, 3 instances equaling 48GB), memory shortages shouldn't normally occur. However, even if one app might consume up to 9GB while the rest consume considerably less, there is still room for instance-level bottlenecks if memory usage isn’t evenly distributed.

    Isolate the High-Usage App, transfer it to a different App Service Plan to prevent affecting other apps. Create additional instances (e.g., scale from 3 to 4 or 5) to better distribute memory load. Use Application Insights to look into memory usage and fix leaks or inefficiencies. Use Azure Monitor's Memory Working Set metric or Kudu's Process Explorer to monitor per-app memory usage.

    Regarding Cost Explanation Yes, cost is an instance basis, if one instance costs $1000/month, three instances equal $3000, plus data transfer charges, as applicable.

    https://azure.microsoft.com/en-us/pricing/details/app-service/linux/
    https://learn.microsoft.com/en-us/azure/app-service/monitor-app-service
    https://learn.microsoft.com/en-us/azure/app-service/troubleshoot-diagnostic-logs

    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.


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.