Azure Web App Temp file cleaning responsibility

后端 未结 3 569
你的背包
你的背包 2021-01-11 15:31

In one of my Azure Web App Web API application, I am creating temp files using this code in a Get method

    string path = Path.GetTempFileName();
    // d         


        
3条回答
  •  遥遥无期
    2021-01-11 16:11

    Those files only get cleaned when your site is restarted.

    If your site is running in Free or Shared mode, it only gets 300MB for temp files, so you could run out if you don't clean up.

    If your site is in Basic or Standard mode, then there is significantly more space (around 200GB!). So you could probably get away with not cleaning up without running into the limit. Eventually, your site will get restarted (e.g. during platform upgrade), so things will get cleaned up.

    See this page for some additional detail on this topic.

提交回复
热议问题