docker-compose slow on docker for mac os beta
docker-compose is slow with docker for mac os beta on my home network. Here is my workaround for now:
- docker-compose up (take ages)
- shut down wifi
- docker-compose up (really fast)
- re-enable wifi
I do not reproduce the issue on another network than mine, my work network for instance do not make it slow. I already had a potentially related issue with the docker client itself which couldn't pull any image (going to bizarre local ips instead of the docker hub registry) but it has been fixed since one of the latest docker for mac os beta update.
The issue is not reproduced against the docker-toolbox, only the "native" docker for mac.
My version of docker-compose is : docker-compose version 1.7.0, build 0d7bf73
My version of docker for mac is: Version 1.11.1-beta10 (build: 6662)
The docker-compose file I'm trying to run is:
#docker-compose.yml
sync-engine:
build: nylas-sync-engine
ports:
- 5555:5555
links:
- mysql:mysql
- redis:redis
hostname: sync-engine
log_opt:
max-size: "10m"
max-file: "10"
mysql:
image: mysql
environment:
- MYSQL_ROOT_PASSWORD=whateverpassword
volumes:
- nylas_mysql:/var/lib/mysql
log_opt:
max-size: "10m"
max-file: "10"
redis:
image: redis
volumes:
- nylas_redis:/data
log_opt:
max-size: "10m"
max-file: "10"
ping @frenchben :smile:
+1
got the same issue :D
@smith64fx problem also goes away if you turn off your WiFi?
@stijn Yes, when i turn off wifi everything works like charm
Von meinem iPhone gesendet
Am 05.05.2016 um 00:26 schrieb Sebastiaan van Stijn [email protected]:
@smith64fx problem also goes away if you turn off your WiFi?
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub
@smith64fx I see from your signature that you are likely from Germany (or Austria/switzerland). Do you mind me asking what is your Internet provider? I'm wondering if we have the same, and if it could be coming from the box which does not look like a very good piece of hardware/software and would not act as thought by docker.
(I am with Vodafone and I have their easybox-whatever)
Same issue on a wired network (corporate network), as soon as I un plug it everything is very fast. So I'm positive it is not related to you specific provider.
I've looked at the verbose output, there is no obvious error (nor anywhere in the system logs). Did notice this though:
With no networking, these lines are grouped together:
docker attach <- (u'd90162cbfd7b312c28488a209440641b2d9c9f99e8eb59082f20ddf7d84e7b7e', stderr=True, stream=True, stdout=True)
docker attach -> <generator object _multiplexed_response_stream_helper at 0x1045f20a0>
docker start <- (u'd90162cbfd7b312c28488a209440641b2d9c9f99e8eb59082f20ddf7d84e7b7e')
Without networking, I get ~100-200 lines of 'compose.parallel.feed_queue: Pending: set([])' between the attach <- and where it returns with attach -> ...
Before this point there is a lot more happening with network as well, but mostly just more calls to inspect image etc it seems.
I've attached the output of compose --verbose up for bot situations. The compose file is just two containers straight from the hub.
@holstvoogd oh, ok for the provider. Thanks for the info, I was a bit worried :)
@Erwyn @smith64fx To confirm, you're always connected (hard-wired) and at the same time use the same network with wifi?
@FrenchBen No it's only in the wifi network in my home. At my office it's super fast. But the thing is, everything else at home runs fast, except docker-compose ^_^"
@FrenchBen same as @smith64fx. It's only wifi at home so there is no wired connection involved. And as I can see @holstvoogd seems to have the same issue with a wired connection.
I am noticing the same issue with Docker for Mac Beta. docker-compose up is slow when Wifi is enabled, fast when Wifi is disabled.
- Docker Compose version: docker-compose version 1.7.1, build 0a9ab35
- Docker version: Docker version 1.11.1, build 5604cbe
- OS version: OS X El Capitan 10.11.4
Hi, Is there any news about this?
I have same issue. Compose/Docker/OSX versions are same as @eugenesia has. I use WiFi at home and at office and at my home it works incredibly slow. At office it works as expected (fast).
I thought maybe it is something related to DNS server of my ISP (home and office internet providers are different) and I tried to use some public DNS including Google's one but it didn't help.
If I turn WiFi off then docker-compose works really fast
@KryDos A new release should be coming out this week with some speed improvements
I have the same issue, after updating to docker for mac 1.11.1-beta13, the problem persists. The workaround by switching the network(s) off and on again does not work anymore, the services start fast when switching the network off, but when switching the network on again, the services is no longer accessible and the docker daemon is not responding
docker ps
Error response from daemon: Bad response from Docker engine
- Docker Compose version: docker-compose version 1.7.1, build 0a9ab35
- Docker version: Docker version 1.11.1-beta13, build 7975
- OS version: OS X El Capitan 10.11.5
I've had the same issues, and found a post (sorry, lost the ref) mentioning docker-compose is trying to resolve localunixsocket.local. You can get insight into the dns lookup by running sudo tcpdump -A -s0 -nni en0 port 53
For now I've pointed localunixsocket.local to localhost in my /etc/hosts. Now everything is speedy again.
127.0.0.1 localunixsocket.local
Thanks @jewilmeer, that looks useful
I switched back using virtualbox with docker-machine. Problem doesn't exist and it's up to 10x faster than Docker Mac Beta!
@smith64fx please keep your comments constructive; it's a beta, it's not a finished product yet, so bugs and performance issues are expected. It's exactly these kind of issues that need reporting (and testing) to resolve them.
super awesome comment, @jewilmeer! For me I had to add a few more addresses to /etc/hosts which I discovered using your tcpdump command:
# (yours)
127.0.0.1 localunixsocket.local
# additional ones -- be sure to replace bracketed thing with the output of `hostname`
127.0.0.1 localunixsocket.home <my hostname>.home
After those additions -- speedy! Actually, amazingly speedy, seems a good bunch faster than when using Docker Toolbox! woop woop :) (Though that may be a highly subjective observation!)