Azure Web应用程序保存临时文件的限制 [英] Azure Web app save temporary files limit
问题描述
我需要将文件临时存储在我的Azure Web应用程序(应用程序服务)上.我不必在Web应用程序实例之间共享这些文件.
I have need to store files temporary on my Azure web app (app service). I don't have to share these files between web app instances.
我已阅读(在 kudu Wiki 中)我可以使用d:\ local进行这种存储,但是对于可以在那里存储的数据量有什么限制?
I have read (in the kudu wiki) that I can use the d:\local for such storage, but what limitations exists regarding the amount of data that can be stored there?
我还了解到,这取决于Web应用程序的选定级别(sku)(基本,标准,高级),但是我没有发现任何确切的大小限制.
I have also read that it depends on the selected level (sku) of the web app (Basic, standard, premium) but I have not found any exact size limitations.
有什么方法可以在运行时使用代码确定这一点?
更新:
当我在基本Web应用程序上的Kudo中检查环境"选项卡时,它将列出
UPDATE:
When I check the the Environment tab in Kudo on my Basic web app it lists
D:\home usage: 10,240 MB total; 10,072 MB free
d:\local usage: 230,397 MB total; 198,341 MB free
但是,如果我使用System.IO.DriveInfo.GetDrives()
进行检查,则D驱动器列表为
But if I do a check using System.IO.DriveInfo.GetDrives()
the D drive lists as
d:\ usage: 32,768 MB total; 12,083 MB free
(工藤显示的内容远远超过d:\ local驱动器的内容.)
另一个奇特的事情是,您可以在Kudo控制台中浏览文件系统,但是在那里找不到我在Web应用程序上创建的文件.
(Kudo shows a lot more than that for the d:\local drive.)
Another peculiar thing is that you can navigate the filesystem in the Kudo console but the files I create on the web app can not be found there.
推荐答案
This Kudu wiki page has more info about it. Copying from there in the Temporary Files section:
对于免费和共享网站,所有这些位置加在一起(即不是按文件夹)限制为500MB.对于标准站点和基本站点,此限制非常高(超过100GB).
For Free and Shared sites, there is a 500MB limit for all these locations together (i.e. not per-folder). For Standard and Basic sites, the limit is very high (over 100GB).
此外,如果您进入Kudu中的环境"标签,它会告诉您有多少可用空间(您关心d:\local
),例如
Also, if you go to the Environment tab in Kudu, it tells you how much space is available (you care about d:\local
), e.g.
D:\home usage: 1,024 MB total; 616 MB free
d:\local usage: 500 MB total; 499 MB free
D:\home usage: 1,024 MB total; 616 MB free
d:\local usage: 500 MB total; 499 MB free
这篇关于Azure Web应用程序保存临时文件的限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!