Why Does 'docker-compose up' Time Out with UnixHTTPConnectionPool?

DDD
Release: 2024-11-15 17:10:03
Original
704 people have browsed it

Why Does

"docker-compose up" Times Out with UnixHTTPConnectionPool

When executing docker-compose up, particularly for a substantial number of services/containers, users may encounter 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).
Copy after login

Possible Solutions:

To resolve this issue and facilitate successful execution of docker-compose up, consider implementing the following workarounds:

  • Restart the docker service: Executing the command sudo systemctl restart docker can alleviate the issue.
  • Set environment variables: Configure two environment variables to extend the timeout period:
export DOCKER_CLIENT_TIMEOUT=120
export COMPOSE_HTTP_TIMEOUT=120
Copy after login

Note that these workarounds do not permanently resolve the issue. For further insights, refer to the related threads on GitHub:

  • https://github.com/docker/compose/issues/3927
  • https://github.com/docker/compose/issues/4486
  • https://github.com/docker/compose/issues/3834

The above is the detailed content of Why Does 'docker-compose up' Time Out with UnixHTTPConnectionPool?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template