docker-compose up to start a container service timeout error: ... COMPOSE_HTTP_TIMEOUT to a higher value (current value: 60)

Problem :

        I use docker is running a medium-sized project, it contains more than 40 micro-services and related docker. Due to excessive docker-compose up and start services over the HTTP requests 60s time limit has not all successful start up, so there are a time-out error:

ERROR: 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).

60s which is the default time.
Solutions :

       The COMPOSE_HTTP_TIMEOUT transfer large value, and turn the environment variable.

Solving steps :

       First enter the / etc / profile configuration file, execute the command:

vi / etc / profile

       Then add the code below the tail:

export COMPOSE_HTTP_TIMEOUT=500
export DOCKER_CLIENT_TIMEOUT=500

       Then the / etc / profile configuration file to take effect, execute the command:

source /etc/profile

       Finally, re-execute the command docker-compose up to.

Guess you like

Origin www.cnblogs.com/zhongyuanzhao000/p/11334190.html