Azure App Service Limit (2) – Temp File Usage (Windows)

This post has been republished via RSS; it originally appeared at: New blog articles in Microsoft Community Hub.

In the first blog of the app service limits series, we know the web app contents are typically saved in the attached remote storage associated with the App Service plan.


For temporary files, they are stored in the temporary directory specific to the running instance of the app. And there is a quota limit for those temporary files as well. If you suspect that the app service's performance issue is related to the storage space issue, it's essential to check both the App Service plan's storage and the amount of temporary file's usage. 


To better understand the Azure App Service File System please refer to below diagram:



In this blog, we will focus on the temporary file usage of the Azure App Service by clarifying the most commonly asked questions below:


1. What is the threshold for temporary file storage space?

The size limits vary based on the pricing tier and type of the plan. Here are some general guidelines:

SKU Family




Basic, Standard, Premium

11 GB

15 GB

58 GB

PremiumV2, Isolated

21 GB

61 GB

140 GB


2. Where do I check to see if my site has hit a threshold?

Navigate to Diagnose and solve problems blade, and type "Temp" and select Temp File Usage On Workers:


From this detector, we can gather information about two things:

(1) The temp file usage for each machine;

(2) The threshold limit for all the machines in this plan.

Kindly note:

Considering that calculating the file size can take up system resources and impact response time, the file size is continuously monitored and updated once per hour.


3. Can I set up an alert for temporary storage usage?

Currently, it is not supported to set up an alert specifically for the usage of temporary files. However, we can manually monitor and check the usage through the methods mentioned in question 2 above.


4. Where can I view these temporary files?

By default, the main site and the kudu site do not share the temp files, so you are not able to see the main site's temp files from the kudu console. By adding the app setting (WEBSITE_DISABLE_SCM_SEPARATION = true) to disable the separation, we will be able to check the file usage details from the kudu site. Please notes, adding this app setting will cause the site to restart, resulting in the cleanup of temporary files. As a result, it is advised to wait for several hours before checking the usage again.


A number of common Windows locations are using temporary storage on the local machine. For instance,

%APPDATA% maps to %SYSTEMDRIVE%\local\AppData.

%ProgramData% maps to %SYSTEMDRIVE%\local\ProgramData.

%TMP% maps to %SYSTEMDRIVE%\local\Temp.

%SYSTEMDRIVE%\local\DynamicCache for Dynamic Cache feature. 


5. What should I do if the threshold has already been reached or will be reached soon?

If these temporary files have been checked and backed up, we can do one of the following operations:

(1) Restart the site

Restarting the website will clear all temporary files, but since many cases are caused by the website storing some cache files, this is only a temporary operation. Also note that a cold start (like killing the IIS process by force or restarting the instance from the advance tool), will not affect temporary files.

(2) Scale up the plan

If you already know that your site needs more temporary space, switching to a larger machine will give you more temporary space.

(3) Update the application code

Find the source code that creates the temporary file and modify it at the code level.




Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.