The following forum(s) have migrated to Microsoft Q&A (Preview): Azure App Service - API Apps!
Visit Microsoft Q&A (Preview) to post new questions.

Learn More

 locked
Memory RRS feed

  • Question

  • Hi Everyone,

    Where can I find more resources about memory allocation for app services in Azure?

    I have this .Net Core app that uses MVC, Api and SignalR Service that runs along with 4 other smaller apps. When I enable Application Insights memory grows a lot! With Application Insights disabled this doesn't happen.

    When I used a 3.5 RAM plan, this app's memory was up to 1.2 GB. I scaled up to a 7 GB RAM plan, and this app is now up to 3.5 GB. By up to I mean that this app uses that much memory until it drops about 10%, slowly grows again to the limit, then it drops again and a;l over again.

    I imagine the Garbage Collector kicks in the point when the memory drops but I wonder what are the rules the govern this behavior.

    I have set my app as ServerGC: false.

    Some more details here: github - Application Insights memory usage


    Monday, August 5, 2019 9:06 PM

All replies

  • Hi Alex,

    Yes, scaling your App Service Plan should definitely help. You can read How do I troubleshoot a high memory-consumption scenario? For more information. 

    Also, when you notice an app consumes more memory than expected as indicated via monitoring or service recommendations, consider the App Service Auto-Healing feature. One of the options for the Auto-Healing feature is taking custom actions based on a memory threshold. Actions span the spectrum from email notifications to investigation via memory dump to on-the-spot mitigation by recycling the worker process. Auto-healing can be configured via web.config and via a friendly user interface as described at in this blog post for the App Service Support Site Extension.

    Hope that helps. Let us know if you have further questions.

    Thanks,

    Grace

    Tuesday, August 6, 2019 9:57 PM
  • Thank you Grace for mentioning those options.

    Do you, by any chance, know where can I find more resources about memory allocation for app services in Azure?

    I mean what rules govern the the GC behavior in Azure ecosystem?



    • Edited by Alex Iordan Wednesday, August 7, 2019 1:14 PM
    Wednesday, August 7, 2019 6:42 AM
  • Hi Alex,

    Apologies for the delay in response. Please take a look at these blog posts and let me if this is the type of information you're looking for. 

    How to view the memory utilization of your Azure Web Site

    Server Garbage Collection Mode in Microsoft Azure

    Thanks,

    Grace

    Thursday, August 15, 2019 8:51 PM
  • Hi Grace,

    Thank you for those resources, however they only describe the principles, not actual threshold values.

    Regarding my initial question, I managed to obtain some answers on github from one Microsoft member. But they seem to be deducted from what happened, not based on documentation of any kind.

    Could you please confirm the percentages presented here https://github.com/microsoft/ApplicationInsights-aspnetcore/issues/912#issuecomment-535717252 by Dmitry Matveev with possibly indicating the source?

    If it is not up to you, please point me to the right person.

    Best regards,

    Alex

    Friday, September 27, 2019 8:06 AM