{"action":"created","issue":{"url":"https://api.github.com/repos/docker/for-mac/issues/686","repository_url":"https://api.github.com/repos/docker/for-mac","labels_url":"https://api.github.com/repos/docker/for-mac/issues/686/labels{/name}","comments_url":"https://api.github.com/repos/docker/for-mac/issues/686/comments","events_url":"https://api.github.com/repos/docker/for-mac/issues/686/events","html_url":"https://github.com/docker/for-mac/issues/686","id":178373542,"number":686,"title":"Docker crashes when container is making lots of DNS queries","user":{"login":"andreychernih","id":131281,"avatar_url":"https://avatars.githubusercontent.com/u/131281?v=3","gravatar_id":"","url":"https://api.github.com/users/andreychernih","html_url":"https://github.com/andreychernih","followers_url":"https://api.github.com/users/andreychernih/followers","following_url":"https://api.github.com/users/andreychernih/following{/other_user}","gists_url":"https://api.github.com/users/andreychernih/gists{/gist_id}","starred_url":"https://api.github.com/users/andreychernih/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreychernih/subscriptions","organizations_url":"https://api.github.com/users/andreychernih/orgs","repos_url":"https://api.github.com/users/andreychernih/repos","events_url":"https://api.github.com/users/andreychernih/events{/privacy}","received_events_url":"https://api.github.com/users/andreychernih/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/for-mac/labels/osx/10.11.x","name":"osx/10.11.x","color":"d4c5f9"},{"url":"https://api.github.com/repos/docker/for-mac/labels/status/2-in-progress","name":"status/2-in-progress","color":"e99695"},{"url":"https://api.github.com/repos/docker/for-mac/labels/status/3-fixed","name":"status/3-fixed","color":"0e8a16"},{"url":"https://api.github.com/repos/docker/for-mac/labels/version/beta26","name":"version/beta26","color":"ededed"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-21T15:01:55Z","updated_at":"2016-09-26T15:46:27Z","closed_at":null,"body":"### Expected behavior\r\n\r\nDocker should operate normally when lots of UDP queries are made.\r\n\r\n### Actual behavior\r\n\r\nDocker crashes because it runs above system open connections limit.\r\n\r\n### Information\r\n\r\n```\r\nDocker for Mac: version: 1.12.1-beta26.1 (12c3e63)\r\nOS X: version 10.11.6 (build: 15G31)\r\nlogs: /tmp/115C1823-9B8B-44E8-BDF3-C5956B40083C/20160921-075905.tar.gz\r\n[OK]     docker-cli\r\n[OK]     virtualization kern.hv_support\r\n[OK]     menubar\r\n[OK]     moby-syslog\r\n[OK]     dns\r\n[OK]     disk\r\n[OK]     system\r\n[OK]     app\r\n[OK]     osxfs\r\n[OK]     virtualization VT-X\r\n[OK]     db\r\n[OK]     slirp\r\n[OK]     logs\r\n[OK]     env\r\n[OK]     vmnetd\r\n[OK]     moby-console\r\n[OK]     moby\r\n[OK]     driver.amd64-linux\r\n```\r\n\r\n### Steps to reproduce the behavior\r\n\r\n  1. Run `while [[ true ]]; do nslookup nonexistinghost; done` inside Docker container\r\n  2. Wait a few minutes, notice how open connection count is increasing `netstat -na|wc -l`\r\n\r\nOne of my containers is making 30 DNS queries / second which results are failing in development environment (the failure is expected). After a minute of running, Docker crashes. I see the following in the log file:\r\n\r\n```\r\n9/20/16 10:38:11.680 PM Docker[13074]: Docker is not responding: Get http://./info: EOF: waiting 0.5s\r\n9/20/16 10:38:12.184 PM Docker[13074]: Docker is not responding: Get http://./info: EOF: waiting 0.5s\r\n9/20/16 10:38:12.686 PM Docker[13074]: Docker is not responding: Get http://./info: EOF: waiting 0.5s\r\n9/20/16 10:38:13.186 PM Docker[13074]: Docker is not responding: Get http://./info: EOF: waiting 0.5s\r\n9/20/16 10:42:51.000 PM kernel[0]: file: table is full\r\n9/20/16 10:42:51.045 PM Docker[13073]: Socket.Datagram.input: bind returned file table overflow\r\n9/20/16 10:42:51.000 PM kernel[0]: file: table is full\r\n9/20/16 10:42:51.046 PM Docker[13073]: Socket.Datagram.input: bind returned file table overflow\r\n9/20/16 10:42:51.000 PM kernel[0]: file: table is full\r\n9/20/16 10:42:51.077 PM Docker[13073]: Socket.Datagram.input: bind returned file table overflow\r\n9/20/16 10:42:51.000 PM kernel[0]: file: table is full\r\n9/20/16 10:42:51.101 PM Docker[13073]: Socket.Datagram.input: bind returned file table overflow\r\n9/20/16 10:42:51.000 PM kernel[0]: file: table is full\r\n9/20/16 10:42:51.109 PM Docker[13073]: Socket.Datagram.input: bind returned file table overflow\r\n9/20/16 10:42:51.000 PM kernel[0]: file: table is full\r\n```\r\n\r\nOutput of lsof on host machine (Mac):\r\n\r\n```\r\n$ ps xau|grep -i docker|awk '{ print \"-p \"  $2 }'|xargs lsof\r\n...\r\ncom.docke 15037 andreychernih 1071u    IPv4 0x47027f022025ad3d        0t0      UDP *:61073\r\ncom.docke 15037 andreychernih 1072u    IPv4 0x47027f022025e495        0t0      UDP *:50644\r\ncom.docke 15037 andreychernih 1073u    IPv4 0x47027f022025aad5        0t0      UDP *:58157\r\ncom.docke 15037 andreychernih 1074u    IPv4 0x47027f022025a86d        0t0      UDP *:59711\r\ncom.docke 15037 andreychernih 1075u    IPv4 0x47027f022025e6fd        0t0      UDP *:49271\r\ncom.docke 15037 andreychernih 1076u    IPv4 0x47027f022025e965        0t0      UDP *:53894\r\ncom.docke 15037 andreychernih 1077u    IPv4 0x47027f022025ebcd        0t0      UDP *:52993\r\ncom.docke 15037 andreychernih 1078u    IPv4 0x47027f022025ee35        0t0      UDP *:58466\r\ncom.docke 15037 andreychernih 1079u    IPv4 0x47027f022025a605        0t0      UDP *:50211\r\ncom.docke 15037 andreychernih 1080u    IPv4 0x47027f022025a39d        0t0      UDP *:55463\r\ncom.docke 15037 andreychernih 1081u    IPv4 0x47027f022025a135        0t0      UDP *:50014\r\ncom.docke 15037 andreychernih 1082u    IPv4 0x47027f02202697b5        0t0      UDP *:64889\r\ncom.docke 15037 andreychernih 1083u    IPv4 0x47027f022026954d        0t0      UDP *:53156\r\ncom.docke 15037 andreychernih 1084u    IPv4 0x47027f02202692e5        0t0      UDP *:52518\r\ncom.docke 15037 andreychernih 1085u    IPv4 0x47027f0220269a1d        0t0      UDP *:55100\r\ncom.docke 15037 andreychernih 1086u    IPv4 0x47027f0220269c85        0t0      UDP *:57927\r\ncom.docke 15037 andreychernih 1087u    IPv4 0x47027f0220269eed        0t0      UDP *:52377\r\ncom.docke 15037 andreychernih 1088u    IPv4 0x47027f022026907d        0t0      UDP *:57464\r\ncom.docke 15037 andreychernih 1089u    IPv4 0x47027f0220268e15        0t0      UDP *:54893\r\ncom.docke 15037 andreychernih 1090u    IPv4 0x47027f0220268bad        0t0      UDP *:63309\r\ncom.docke 15037 andreychernih 1091u    IPv4 0x47027f022026a155        0t0      UDP *:64795\r\ncom.docke 15037 andreychernih 1092u    IPv4 0x47027f022026a3bd        0t0      UDP *:58145\r\ncom.docke 15037 andreychernih 1093u    IPv4 0x47027f02202686dd        0t0      UDP *:54076\r\ncom.docke 15037 andreychernih 1094u    IPv4 0x47027f022025cc85        0t0      UDP *:49685\r\ncom.docke 15037 andreychernih 1095u    IPv4 0x47027f022026a88d        0t0      UDP *:63341\r\ncom.docke 15037 andreychernih 1096u    IPv4 0x47027f022026aaf5        0t0      UDP *:61734\r\ncom.docke 15037 andreychernih 1097u    IPv4 0x47027f022026ad5d        0t0      UDP *:50594\r\ncom.docke 15037 andreychernih 1098u    IPv4 0x47027f022026b22d        0t0      UDP *:54337\r\ncom.docke 15037 andreychernih 1099u    IPv4 0x47027f0220268475        0t0      UDP *:55839\r\n...\r\n```\r\n\r\nLooks like kernel is running out of open files limit.\r\n\r\n```\r\n$ netstat -na\r\n...\r\nudp4       0      0  *.56162                *.*\r\nudp4       0      0  *.57800                *.*\r\nudp4       0      0  *.55147                *.*\r\nudp4       0      0  *.57258                *.*\r\nudp4       0      0  *.59388                *.*\r\nudp4       0      0  *.50489                *.*\r\nudp4       0      0  *.51222                *.*\r\nudp4       0      0  *.57331                *.*\r\nudp4       0      0  *.55401                *.*\r\nudp4       0      0  *.57428                *.*\r\nudp4       0      0  *.50763                *.*\r\nudp4       0      0  *.49741                *.*\r\nudp4       0      0  *.54452                *.*\r\nudp4       0      0  *.54194                *.*\r\nudp4       0      0  *.49581                *.*\r\nudp4       0      0  *.65192                *.*\r\nudp4       0      0  *.60835                *.*\r\nudp4       0      0  *.52061                *.*\r\nudp4       0      0  *.61005                *.*\r\nudp4       0      0  *.57004                *.*\r\nudp4       0      0  *.64485                *.*\r\nudp4       0      0  *.64104                *.*\r\nudp4       0      0  *.53502                *.*\r\nudp4       0      0  *.64804                *.*\r\nudp4       0      0  *.64373                *.*\r\nudp4       0      0  *.57235                *.*\r\nudp4       0      0  *.64774                *.*\r\nudp4       0      0  *.58719                *.*\r\nudp4       0      0  *.58898                *.*\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/docker/for-mac/issues/comments/249609785","html_url":"https://github.com/docker/for-mac/issues/686#issuecomment-249609785","issue_url":"https://api.github.com/repos/docker/for-mac/issues/686","id":249609785,"user":{"login":"andreychernih","id":131281,"avatar_url":"https://avatars.githubusercontent.com/u/131281?v=3","gravatar_id":"","url":"https://api.github.com/users/andreychernih","html_url":"https://github.com/andreychernih","followers_url":"https://api.github.com/users/andreychernih/followers","following_url":"https://api.github.com/users/andreychernih/following{/other_user}","gists_url":"https://api.github.com/users/andreychernih/gists{/gist_id}","starred_url":"https://api.github.com/users/andreychernih/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreychernih/subscriptions","organizations_url":"https://api.github.com/users/andreychernih/orgs","repos_url":"https://api.github.com/users/andreychernih/repos","events_url":"https://api.github.com/users/andreychernih/events{/privacy}","received_events_url":"https://api.github.com/users/andreychernih/received_events","type":"User","site_admin":false},"created_at":"2016-09-26T15:46:27Z","updated_at":"2016-09-26T15:46:27Z","body":"Thank you so much, @djs55 Can't wait to give it a try."}}
{"actor":{"display_login":"andreychernih"}}