Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running out of memory in Azure with 50% utilization

I ran into a situation where out of memory exceptions were generated in our Azure App Service for a .Net Core Web API even though memory & utilization topped 50% in the App Service Plan (P2V2: 7GB RAM).

I have looked at this SO article to check private bytes and other things but still don't see where the memory of exhaustion comes from. I see a max usage of 1.5GB on the memory working set which is well below the 7GB.

Nothing shows up under Support + Troubleshooting -> Resource Health or App Service Advisor.

I am not sure where to look next and any help would be appreciated.

like image 741
Pascal Avatar asked Nov 15 '25 22:11

Pascal


1 Answers

Azure App Services caps memory usage at 1.5G by default. But you can change this behaviour with this application setting (to be added under Configuration):

WEBSITE_MEMORY_LIMIT_MB = 3072

See also my answer here: Is there way to determine why Azure App Service restarted?

like image 173
Jeroen Visscher Avatar answered Nov 18 '25 12:11

Jeroen Visscher



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!