Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-compose is abnormally slow #1557

Closed
mvasin opened this issue Apr 22, 2017 · 7 comments

Comments

@mvasin
Copy link

commented Apr 22, 2017

Expected behavior

docker-compose ps and the rest of docker-compose commands should run reasonably fast.

Actual behavior

docker-compose ps takes 10 seconds. The rest of the commands run very slow as well.

$ time docker-compose ps
Name   Command   State   Ports
------------------------------

real	0m10.318s
user	0m0.238s
sys	0m0.056s

docker run ubuntu echo hello takes less then a second, while equivalent task in docker-compose.yml

version: "3"
services:
  ubuntu:
    image: ubuntu
    command: ["echo", "hello"]

takes 1 minute 16 seconds.

Information

  • Full output of the diagnostics from "Diagnose & Feedback" in the menu
    (b18e2a50c)
    macOS: version 10.12.4 (build: 16E195)
    logs: /tmp/E82DCC22-339C-4F85-B804-8DD9297FA7F3/20170422-124808.tar.gz
    [OK] vmnetd
    [OK] dns
    [OK] driver.amd64-linux
    [OK] virtualization VT-X
    [OK] app
    [OK] moby
    [OK] system
    [OK] moby-syslog
    [OK] db
    [OK] env
    [OK] virtualization kern.hv_support
    [OK] slirp
    [OK] osxfs
    [OK] moby-console
    [OK] logs
    [OK] docker-cli
    [OK] menubar
    [OK] disk

Steps to reproduce the behavior

It used to work normal, then for no particular reason it started to run that slow. Resetting docker for mac to factory defaults, restarting OS doesn't help. So I have no idea how to reproduce this problem, as soon as I did nothing special.

@mvasin

This comment has been minimized.

Copy link
Author

commented Apr 22, 2017

Wow, just reinstalled the whole macOS and it didn't help.

So, here are the steps to reproduce:

  1. Install macOS
  2. install homebrew
  3. install cask
  4. brew cask install docker
@staticfloat

This comment has been minimized.

Copy link

commented Apr 24, 2017

I am having this problem as well; here's a minimal working example. With this docker-compose.yml file:

version: '2.1'
services:
    ubuntu:
        image: ubuntu

I get the following timings for container creation/running /bin/true. Note that I've run the docker-compose run step multiple times, so this doesn't even include things like network creation.

$ time docker-compose run ubuntu true

real    1m38.009s
user    0m1.103s
sys     0m0.260s

Compare this with docker run:

$ time docker run -ti ubuntu true

real    0m0.851s
user    0m0.021s
sys     0m0.036s

Anecdotally, the 1m38s time is very stable, and I suspect some kind of internal timeout occurring, especially as there is no high CPU utilization or anything like that.

@ebriney

This comment has been minimized.

Copy link
Member

commented Apr 28, 2017

Hi guys, this is a known compose bug (see here).
Adding 127.0.0.1 localunixsocket.local in your /etc/hosts should fix it.

@kvahuja

This comment has been minimized.

Copy link

commented May 9, 2017

It was working fine all along and suddenly a few hours compose just slowed like anything - here is the ID - can someone confirm that it's same - A2E893EB-3FF2-4B5F-AFAF-19CF2B8FAE3B.

@ebriney - the host entry isn't helping. Also how come this just started to happen suddenly?

@qdubious

This comment has been minimized.

Copy link

commented Jun 18, 2017

I'm not sure if this is normal but I'm seeing multiple processes when issuing a docker-compose up followed by ps -eaf | grep docker-compose ...

$ ps -eaf | grep docker-compose
501 75205 74937 0 4:22AM ttys000 0:00.06 docker-compose up
501 75206 75205 0 4:22AM ttys000 0:00.22 docker-compose up
501 75294 69133 0 4:26AM ttys002 0:00.00 grep docker-compose

@tiagopog

This comment has been minimized.

Copy link

commented Jun 30, 2017

I had the same issue here and it turned out to be a DNS miss-configuration problem. Then after setting my network with a proper and healthy DNS configuration the docker-compose CLI got back working as usual.

@mvasin

This comment has been minimized.

Copy link
Author

commented Jul 3, 2017

I believe it's a duplicate of docker/compose#3419

@mvasin mvasin closed this Jul 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.