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 commands perform very slowly #629

Closed
herecydev opened this issue Apr 10, 2017 · 22 comments
Closed

Docker-compose commands perform very slowly #629

herecydev opened this issue Apr 10, 2017 · 22 comments

Comments

@herecydev
Copy link

herecydev commented Apr 10, 2017

I've put a comment here also but I'm thinking that this is more targeted to docker for windows.

Expected behavior

Docker-compose performs quickly, as normal docker commands do.

Actual behavior

Docker-compose has significant delays when executing commands like docker-compose ps. Usually around 100x that of normal docker commands like docker ps. The waits seem to occur around the following logs:

compose.cli.verbose_proxy.proxy_callable: docker containers <- (all=True, filters={u'label': [u'com.docker.compose.project=foo', u'com.docker.compose.oneoff=
False']})

or

compose.cli.verbose_proxy.proxy_callable: docker containers -> (list with 0 items)

But it's very difficult to pinpoint the issue. Commands like docker run or docker ps are completely unaffected.

Information

Windows 10 Professional
Version 17.03.1-ce-win5 (10743)

I have tried changing the DNS to google's DNS 8.8.8.8 but this hasn't affected the time. Internet connectivity is wired, and experiencing normal, quick responses on the host (windows machine). I'm more than happy to provide more information, but I don't know what else to give.

Factory reset of docker does not help, however uninstalling, deleting hyper-v machines and reinstalling docker completely does help temporarily. It will run smoothly until an indeterminate amount of time (usually under an hour) at which point it exhibits the excessive wait times.

@friism
Copy link

friism commented Apr 11, 2017

@herecydev could I convince you to run and post diagnostic ids, preferable both before and after you incur the slowdown.

Pinging @shin-

@herecydev
Copy link
Author

Absolutely, several of us here are seeing the same symptoms and want to help but don't really know what to look for. Could you advise us what's the best way to get the information you need.

Additional information we discovered today: machine restarts help in a similar way to reinstalling docker but for a limited time only. At some undefined point, severe performance problems occur, though it seems like frequent activity accelerates the problem. Once again, base docker commands are unaffected but compose is seriously impacted. I've looked for unusual DNS requests using tcpdump but there doesn't look like there many requests at all.

CC'ing @smudge202

@friism
Copy link

friism commented Apr 11, 2017

image

@herecydev

@herecydev
Copy link
Author

Yep that's perfect will post back ASAP with some IDs.

@smudge202
Copy link

smudge202 commented Apr 12, 2017

Hopefully it's acceptable that I've done this slightly out of order. So my machine had been on for a while and was experiencing the incredibly sluggish docker-compose behaviour @herecydev described (docker-compose ps took 43 seconds to execute) when I arrived at work this morning. The diagnostic ID at the point it's running slow was 5712F26E-3C2B-4F6D-A5DF-FFCA8BF0B2DC/2017-04-12_08-45-25.

I'm just going to restart quickly...

After restarting I did a docker-compose up -d (took 5 seconds) in the same directory as before to ensure the same services were running (somehow feels like it makes it more fair if both times I run ps the same containers are running). The docker-compose ps command then took 2 seconds to execute (and display the same output as before the restart). The diagnostics ID for when docker-compose seems to be running correctly is 5712F26E-3C2B-4F6D-A5DF-FFCA8BF0B2DC/2017-04-12_08-59-56.

Let me know if you need anything else.

@herecydev
Copy link
Author

@friism Was everything okay with those diagnostics? Do you need anything else?

@ced-b
Copy link

ced-b commented Apr 22, 2017

I experienced the same issue. In my case I had an http proxy set on Edge which applied Windows wide. Turning the proxy off immediately speeds up docker-compose. However, I was not able to figure out yet what needs to be added to the proxy bypass to make the system use the proxy and bypass the proxy for docker-compose.

@herecydev
Copy link
Author

Can confirm there's some proxy magic going on that's causing compose to slow down. In our case, we frequently have to use fiddler and it was causing the slow down. When you shut it down, the compose immediately completes. Hope that helps @friism. I'm still unsure what interaction compose is having with the windows host.

@sebastiansirch
Copy link

I am experiencing exactly the same issue. docker-compose is basically unusable for me behind a corporate proxy. Here is my support ID: 7CC20D73-F6F6-4838-BAF9-F87958043D04/2017-07-04_20-50-21
Is there a workaround or fix for this issue?

@borgdrone7
Copy link

Same problem here with Fiddler. Disabling proxy is not a solution.

@Blizzke
Copy link

Blizzke commented Nov 22, 2017

Same issue here... docker-compose up with proxy enabled - almost 15 minutes, without proxy about 10 seconds.

@adam42a
Copy link

adam42a commented Nov 24, 2017

Using Docker on Windows in a corporate secure environment is like being stoned to death. After figuring out a work-around for the inability to create volumes due to the firewall, I've now hit this issue too.

@andriusjakas
Copy link

Similar here:

Win10 and using docker-compose, but if i set windows environment variables http_proxy and https_proxy its fast again (probably bypasses windows system proxy)

@ccrowhurstram
Copy link

ccrowhurstram commented Mar 30, 2018

I get very slow response times as well, but it's not limited to docker-compose.

For example, docker ps takes 20-25 seconds to return even when there are no containers running.


version info

Version: 18.03.0-ce-rc1-win54 (16164)
Channel: edge
Sha1: e10c72243aa1fbd51f15358e2ddb3c668c187b4b
Started on: 2018/03/27 08:17:55.346
Resources: C:\Program Files\Docker\Docker\Resources
OS: Windows 10 Pro
Edition: Professional
Id: 1709
Build: 16299
BuildLabName: 16299.15.amd64fre.rs3_release.170928-1534


A diagnostic was uploaded with id: 77B8452F-E5DE-4F24-9721-1E92EA992B77/2018-03-30_18-43-13

@minhtranes
Copy link

I encountered the same issue with
A diagnostic was uploaded with id: D0009917-D217-41C9-B854-915BCD314256/2018-04-03_01-26-09

@Rene94
Copy link

Rene94 commented Jul 13, 2018

docker compose up command takes too much time !! how can I solve this?

@docker-robott
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30d of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle stale

@Pvlerick
Copy link

/remove-lifecycle stale

This is still an issue :-(

@docker-robott
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30d of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle stale

@adifatol
Copy link

/remove-lifecycle stale

Slow here also, behind corporate proxy. Removing it is not an option.
Here is a diagnostic I uploaded: 46B0E81C-B47B-4F66-8E72-C33394C0E1A9/2019-06-13_14-52-48

@niclaslindstedt
Copy link

Also having this issue. Behind corporate firewall.

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Jun 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests