docker-compose up超时与UnixHTTPConnectionPool [英] `docker-compose up` times out with UnixHTTPConnectionPool

查看:365
本文介绍了docker-compose up超时与UnixHTTPConnectionPool的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我们的Jenkins代理中,我们正在运行大约几项(约20项)测试,其设置涉及为大量服务/容器运行 docker-compose up ( 14)。

In our Jenkins agents we are running about several (around 20) tests whose setup involves running docker-compose up for a "big" number of services/containers (around 14).

我会不时出现以下错误:

From time to time, I'll get the following error:

ERROR: for testdb-data  UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)
An HTTP request took too long to complete. Retry with --verbose to obtain debug information.
If you encounter this issue regularly because of slow network conditions, consider setting COMPOSE_HTTP_TIMEOUT to a higher value (current value: 60).

无法始终如一地重现此内容。而且我仍在尝试找出与我们的代理资源的充分使用是否相关。

Haven't been able to reproduce this consistently. And I'm still trying to figure out whether or not there is a correlation with our agent's resources being at full use.

docker -v 1.10.1 docker-compose -v 1.13 .1

是否有与之相关的任何想法?

Any ideas about what this may be related to?

推荐答案

重新启动docker服务:

Restarting docker service:

sudo systemctl restart docker

并设置 DOCKER_CLIENT_TIMEOUT COMPOSE_HTTP_TIMEOUT 环境变量:

export DOCKER_CLIENT_TIMEOUT=120
export COMPOSE_HTTP_TIMEOUT=120

目前是两个解决方法。但是问题仍然在docker compose github中存在:

are two workarounds for now. But the issues are still open in docker compose github:

https://github.com/docker/compose/issues/3927

https://github.com/docker/compose/issues/4486

https://github.com/docker/compose/issues/3834

这篇关于docker-compose up超时与UnixHTTPConnectionPool的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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