Docker never runs on Azure - Waiting for response to warmup request for container

一笑奈何 提交于 2020-02-04 00:58:25

问题


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

I did set WEBSITE_PORT 8080 (used by my app)

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?

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

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


回答1:


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.

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

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..



来源:https://stackoverflow.com/questions/58723980/docker-never-runs-on-azure-waiting-for-response-to-warmup-request-for-containe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!