How to identify the reason for memory shoot on app service plan

AMRUTA AGARWAL 0 Reputation points
2023-06-26T11:29:53.27+00:00

Hi,

I have a basic B3 instance on an APp Service Plan and only have one app running on the plan. The memory of the application is 7.5gb and the application generally runs at ~30% memory consumption. When I read a particular dataset from Databricks that is a mere 30mb dataset, the memory shoots up to 60% (please see image attached). I tried to drill down to process level memory consumption and there's only one process that is taking up 24% memory when I run that query. This is not adding up to 60% memory utilisation that I see on the main page. Also want to understand why 30mb data is causing the memory utilisation to 60%?

Thanks,

Amruta

Memory consumption 23 Jun 12_48.PNG

memory consumption by process 23-jun-12_45.jpg

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

1 answer

Sort by: Most helpful
  1. Grmacjon-MSFT 19,151 Reputation points Moderator
    2023-07-10T09:31:39.33+00:00

    Hi @AMRUTA AGARWAL

    Thanks for the question. We are sorry to hear you're facing this issue. How long have you had this app running?

    It's possible that you may have a memory leak or the memory usage you are seeing is due to memory fragmentation. Memory fragmentation occurs when the memory used by an application becomes fragmented over time, making it difficult for the application to allocate contiguous blocks of memory. This can cause the application to use more memory than necessary, even for small datasets.

    In your case, it's possible that the 30MB dataset is causing memory fragmentation, which is causing the memory usage to increase. This could be due to the way that the dataset is being loaded into memory or the way that the application is allocating memory.

    To diagnose the issue, do a memory leak analysis by going to your App Service in Azure portal > Select the Diagnose and Solve problems blade > Click the Diagnostic Tools tile. Select the Collect Memory Dump tile where you can create your memory dump by configuring a blob storage to save it to.

    User's image

    -Also, you can consider scaling to a higher app service tier so your application gets all the resources it needs

    I hope this helps! Let me know if you have any further questions.

    -Grace

    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.