docker/for-win

Docker-compose commands perform very slowly

herecydev opened this issue ยท 22 comments

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.

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

Pinging @shin-

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

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

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.

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

ced-b commented

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.

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.

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?

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

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

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.

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)

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

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

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

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

/remove-lifecycle stale

This is still an issue :-(

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

/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

Also having this issue. Behind corporate firewall.

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