Azure Web App for Containers – 启动Web应用程序容器所需的磁盘空间不足

huangapple go评论61阅读模式
英文:

Azure Web App for Containers - Not enough disk space to start the Web App's container

问题

我在Azure上有一个App Service计划,其中包括2个基于Windows的Docker镜像创建的Web应用程序。对于每个应用程序,我有一个额外的暂存槽。

从今天开始,我无法启动其中一个暂存应用程序,我收到以下错误消息:

无法启动容器。错误消息:启动容器所需的磁盘空间不足。当前可用空间:1566 MB。新容器估计磁盘空间:1707 MB。

当我检查App Service计划的文件系统存储时,它显示我仅使用了250GB中的20MB。

Azure是否可能在本地存储旧镜像?如何释放一些空间?

英文:

I have an App Service Plan on Azure with 2 Web Apps created from Windows based Docker images.
For each app I have one additional staging slot.

From today I'm not able to start one of the staging apps, I get following error:

> Unable to start container. Error message: Not enough disk space to start container. Current available space: 1566 MB. New container estimated disk space: 1707 MB

When I check File system storage for App Service Plan, it says that I'm using only 20MB out of 250GB.

Is it possible that Azure is storing old images locally?
How to free some space?

答案1

得分: 1

在最后,我通过扩展到更大的计划、重新启动容器,然后再缩减规模,成功使其工作。之后,我能够多次重新启动容器,而无需再次扩展规模。

英文:

At the end, I was able to make this work by scaling to larger plan, restarting containers and scaling it back down. After that I was able to restart containers multiple times without scaling it up again.

答案2

得分: 0

你使用的Windows基础镜像是什么?你提到无法启动其中一个暂存应用程序,这是否也发生在生产/交换环境中?Windows容器部署在每个实例的本地SSD存储中,位于应用服务计划内。

第一次使用自定义Docker镜像时,我们将执行"docker pull"并拉取所有图层。这些图层会像在本地使用Docker一样存储在磁盘上。在站点重新启动后进行"docker pull"时,我们将只拉取已更改的图层。如果没有更改,我们将简单地使用本地磁盘上的现有图层。更多细节在这里

是的,请查看可用存储/应用服务计划SKU的最大值:

PC2/19 GB | PC3/60 GB | PC4/79 GB

请查看容器的EntryPoint的Dockerfile配置。同一应用服务计划中的所有应用程序共享相同的资源,您需要审查每个应用程序。

为了隔离问题,通常可以尝试在本地运行镜像或进行交换/生产。您可以自由选择不同的自定义Docker镜像来运行应用程序。但是,您必须选择适合您所需框架的正确父镜像。在应用程序启动期间下载父镜像需要一些时间。但是,您可以通过使用以下已在Azure应用服务中缓存的父镜像之一来减少启动时间:

  • mcr.microsoft.com/dotnet/framework/aspnet:4.7.2-windowsservercore-ltsc2019

  • mcr.microsoft.com/windows/nanoserver:1809 - 这是Microsoft ASP.NET Core Microsoft Windows Nano Server图像中使用的基本容器。

请告诉我们进一步的调查进展如何。

英文:

What Windows base image are you using? You have mentioned that you’re unable to start one of the staging apps, does it happen with prod/swap as well? Windows Containers are deployed onto the local SSD Storage in each instance within the App Service Plan.

The first time you use a custom Docker image, we will do a "docker pull" and pull all layers. These layers are stored on disk just as if you were using Docker on-premises. When we do a "docker pull" after a site restart, we will only pull layers that have changed. If there have been no changes, we will simply use existing layers on the local disk. More details here.

Yes, checkout the maximum available storage/App Service Plan SKU:

PC2/19 GB | PC3/60 GB | PC4/79 GB

Review the dockerfile config for the EntryPoint of the container. All apps in the same App Service Plan share the same resources, you need to review each app.

To isolate the issue, generally you may try and run the image locally or swap/production . You're free to use a different custom Docker image to run your app. However, you must choose the right parent image for the framework you want. It takes some time to download a parent image during app start-up. However, you can reduce start-up time by using one of the following parent images that are already cached in Azure App Service:

  • mcr.microsoft.com/dotnet/framework/aspnet:4.7.2-windowsservercore-ltsc2019

  • mcr.microsoft.com/windows/nanoserver:1809 - this image is the base
    container used across Microsoft ASP.NET Core Microsoft Windows Nano
    Server images.

Kindly let us know how it goes for further investigation.

huangapple
  • 本文由 发表于 2020年1月3日 20:01:41
  • 转载请务必保留本文链接:https://go.coder-hub.com/59578287.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定