-
Notifications
You must be signed in to change notification settings - Fork 118
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
DNS lookup is slow #1670
Comments
An update: Since I wrote this ticket, I found #1112 which also seems to be a dupe of this. I've also looked into where the bottleneck is, and it seems like it's Docker for Mac's built in DNS server that's slow. Inside the container, dig says it takes ~2000ms to resolve google.com:
However, if I switch from the DNS server at 192.168.65.1 to 8.8.8.8 the latency goes back to normal: (On host):
So, it seems it's Docker for Mac's DNS server that's just really slow. |
I notice you're running the latest stable version. The latest DNS code in "edge" (which will soon be released to stable) has many bug fixes and improvements -- in particular it tries to use the Mac's native resolver rather than talk to upstreams itself. Could you try "edge" (available from https://docs.docker.com/docker-for-mac/install/#download-docker-for-mac) and let me know if the problem still manifests? If it still manifests, could you upload a fresh diagnostic? Thanks for your report and for using Docker for Mac! |
I manually added I'm a little hesitant to install beta software as I kind of need things working. Can I downgrade to stable after having installed edge? |
@larsnystrom it's possible to downgrade from edge to stable but it forces you to reset to factory defaults. If you want to keep your containers and images and you have a workaround, then perhaps stick with stable -- there's a new update coming soon. |
I'm not sure what's happening, but today the DNS completely stopped working, so I guess my work-around was no good after all. I'll try the edge version and report back. |
Now the container uses There's also some issue which seems to add a tab or something after each line break? But that has nothing to do with this issue. It makes the shell a little harder to use though.
|
Thanks for the update! Sorry about the terminal issue -- that'll be fixed in the next release (hopefully today/tomorrow). It's #1672 A workaround is to run |
I believe this has been fixed in edge. Thanks for your report! |
Closed issues are locked after 30 days of inactivity. 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. |
Expected behavior
Near same latency connecting to example.com from container as from host.
Actual behavior
Connecting from container has ~2.5s latency.
Information
This is probably a dupe of #446 (which was closed due to lacking repro).
I can't provide the output of the diagnosis tool because it crashes my computer. I'm running version 17.03.1-ce-mac12 (17661)
Channel: stable
d1db12684b
on macOS 10.12.5
Steps to reproduce the behavior
Code to reproduce can be found at: https://github.com/larsnystrom/dfm-network-latency
Clone it, and then compare running curl from host and from the container. Here are my results:
The text was updated successfully, but these errors were encountered: