Docker从不在Azure上运行-等待对容器预热请求的响应 [英] Docker never runs on Azure - Waiting for response to warmup request for container

查看:273
本文介绍了Docker从不在Azure上运行-等待对容器预热请求的响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Azure的App Service上部署dockerized应用.我正确输入所有字段,图像被拉出,直到出现超时,我一直收到此错误.

I'm trying to deploy a dockerized app on Azure's App Service. I enter all the fields correctly, my image gets pulled, put I keep getting this error until something times out.

Waiting for response to warmup request for container -<container name > Elapsed time = 154.673506 sec

我确实设置了WEBSITE_PORT 8080(由我的应用程序使用)

I did set WEBSITE_PORT 8080 (used by my app)

这是dockerfile

Here is the dockerfile

FROM google/dart

WORKDIR /app
ADD pubspec.* /app/
RUN pub get --no-precompile
ADD . /app/
RUN pub get --offline --no-precompile

WORKDIR /app
EXPOSE 8080

ENTRYPOINT ["pub", "run", "aqueduct:aqueduct", "serve", "--port", "8080"]

工作正常.我昨晚工作了.我想刷新我的图像,所以我重新启动了.没事.几个小时后,我删除了我的应用,然后重新开始了……没运气.有什么想法吗?

It was working fine. I had it working last night. I wanted to refresh my image so I restarted. Nothing worked. After multiple hours I deleted my app and started again... no luck. Any ideas?

尝试将端口更改为80,但没有运气(这是我起初在正常工作时使用的端口)

EDIT 1: Tried changing port to 80, no luck (This was the port I was using at first when it was working fine)

已部分解决** 我将所有内容都更改为端口8000.我意识到Linux和Windows不喜欢在80上进行非系统侦听.因此,我在8000上进行了所有更改,并在Azure {WEBSITE_PORT,8000}上设置了系统属性.现在,IT似乎运行良好.我不知道这是否是官方解决方案...但是它会在30秒钟后预热

RESOLVED (Partially)* I changed everything to port 8000. I realized that Linux and windows did not like having something non-system listening on 80. Therefore I changed everything on 8000 and set the system properties on Azure {WEBSITE_PORT, 8000}. IT now seems to work fine. I don't know if this is an official fix... But it does warmup after 30-ish seconds

推荐答案

根据您的应用服务计划,如果有选项始终在线",请尝试在Azure的应用程序配置中设置始终在线"门户.

Depending which App Service plan you have, if there is an option ‘always on’, try to set ‘always on’ in the configuration of your app in Azure portal.

如果使用的是Premium App服务计划,则可以设置预热实例数.尝试将其设置为2-3,看看是否会更好..

If you are using a Premium App service plan, you can set pre-warm number of instances. Try to set that to 2-3 and see if it gets any better..here

我和您有相同的经验,但是我的容器很大,因为它包含ML模型,所以最后我改用AKS,因为它的性能更好..

I had the same experience as you, but my container was really big since it contained ML model, so at the end I switched to AKS because it performed better..

这篇关于Docker从不在Azure上运行-等待对容器预热请求的响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆