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?