hi
unning out of space on C:\local can bring your app service to a complete halt.
the reason C:\local\VirtualDirectory0 mirrors C:\home is due to how azure app service handles content synchronization. when you deploy your application, the platform copies your content from the persistent C:\home storage to the local, faster ssd (C:\local) for better performance. VirtualDirectory0 is essentially a working copy of your live site.
for the space issue. C:\local is a temporary drive with limited space, and it's not meant for storing data that grows over time. your app's log files, which are being written to C:\home\site\wwwroot\App_Data\logs, are also being duplicated to this local cache, consuming the precious space.
your approach of deleting the log files and restarting is a valid short term fix, but here are more sustainable solutions.
change your log file path. configure your application to write logs directly to the persistent D:\home drive instead of the wwwroot folder. a path like D:\home\LogFiles\yourapp is much safer and won't be synced to C:\local.
implement log rotation. set up your logging framework to automatically archive or delete old log files. this prevents any single log file from growing indefinitely and filling up the drive.
clean up deployment artifacts. if you have a lot of previous deployment packages in C:\local\Temp, you can safely delete them. the platform manages the current deployment.
stop writing logs to the synced wwwroot folder, and instead write them directly to D:\home. this is the most effective long term solution to prevent C:\local from filling up.
regards,
Alex
and "yes" if you would follow me at Q&A - personaly thx.
P.S. If my answer help to you, please Accept my answer