question

ryanchill avatar image
0 Votes"
ryanchill asked NiharikaKoneru-8312 answered

How to clear Temp storage without restarting Azure Web App

I want to clear the Temp directory for my Web App, however I do not want the app to undergo a restart. Is there a way to just empty out the temp space directly?

azure-webapps
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

NiharikaKoneru-8312 avatar image
0 Votes"
NiharikaKoneru-8312 answered

Yes, temporary storage can be emptied without restarted the Web App. However, it is notable that doing so while the app is running can have unexpected consequences.

The steps to do so would be as follows-

  1. Ensure that this Web App has the app setting which combines the app and Kudu processes:
    https://github.com/projectkudu/kudu/wiki/Configurable-settings#use-the-same-process-for-the-user-site-and-the-scm-site

  2. Navigate to Kudu (<web-app-name>.scm.azurewebsites.net) -> Debug Console -> Cmd

  3. Select the Globe (see screenshot) and run the following command: del /q/f/s %TEMP%*


Also note that adding an application setting to the Web App will restart it, which means to empty temporary storage without restarting the app this setting would have needed to be present beforehand.

118804-picpost.png

For more information on handling temporary storage with your Azure Web App, please see the following video- Video:Troubleshoot Temporary Storage on Azure App Service - Azure | Microsoft Docs




picpost.png (307.4 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.