App Service c:\local space question

Jeff Tucker 90 Reputation points
2024-01-03T15:13:13.52+00:00

Hi,

We recently setup monitoring to alert us if the c:\local space on our Windows based App Service was getting low. We used the details from an earlier post which worked quite well: https://learn.microsoft.com/en-us/answers/questions/1328576/how-to-monitor-storage-space-on-app-services

Our issue now, is that we have detected low free space on our c:\local folder, but we cannot seem to identify what is taking the space. When we monitor this over time, we see the free space slowly going down until it will eventually go to zero. However, if we try to look at all the files themselves, it adds up to a much smaller number and also remains static over time. So it seems that something else is taking the space, but we cannot seem to find what that is.

For reference, the PowerShell we were using to measure the space was the following:

(Get-ChildItem -path c:\local -Recurse -Force -ErrorAction SilentlyContinue | Measure-Object -Property Length -Sum).sum

Any ideas on what is taking this space and how we can find it?

It also is worth noting that if we redeploy the application, that in that case the space gets reset. This also happens if we scale the app service plan up and then back down (although this seems more expected to me, since that is changing the machine size behind the scenes). Doing an advanced application restart does not reclaim any space however.

Any advice or suggestions?

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

1 answer

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 22,706 Reputation points Moderator
    2024-01-05T15:13:08.82+00:00

    @Jeff Tucker Thanks for reply! You may also refer this link- https://microsoft.github.io/AzureTipsAndTricks/blog/tip21.html

    Azure Web Apps Disk Usage is an online tool that shows you the size and details of all the folders in your website.

    You can see the name, size, number of files, last modified date and disk usage percentage of each folder.

    The tool also displays the folders in a tree structure for easy navigation.

    Let us know.

    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.