{"action":"created","issue":{"url":"https://api.github.com/repos/PowerDNS/pdns/issues/4605","repository_url":"https://api.github.com/repos/PowerDNS/pdns","labels_url":"https://api.github.com/repos/PowerDNS/pdns/issues/4605/labels{/name}","comments_url":"https://api.github.com/repos/PowerDNS/pdns/issues/4605/comments","events_url":"https://api.github.com/repos/PowerDNS/pdns/issues/4605/events","html_url":"https://github.com/PowerDNS/pdns/issues/4605","id":184777988,"number":4605,"title":"dnsdist 1.1.0-beta1 doesn't release file descriptors","user":{"login":"dseira","id":378158,"avatar_url":"https://avatars.githubusercontent.com/u/378158?v=3","gravatar_id":"","url":"https://api.github.com/users/dseira","html_url":"https://github.com/dseira","followers_url":"https://api.github.com/users/dseira/followers","following_url":"https://api.github.com/users/dseira/following{/other_user}","gists_url":"https://api.github.com/users/dseira/gists{/gist_id}","starred_url":"https://api.github.com/users/dseira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dseira/subscriptions","organizations_url":"https://api.github.com/users/dseira/orgs","repos_url":"https://api.github.com/users/dseira/repos","events_url":"https://api.github.com/users/dseira/events{/privacy}","received_events_url":"https://api.github.com/users/dseira/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/PowerDNS/pdns/labels/defect","name":"defect","color":"cccccc"},{"url":"https://api.github.com/repos/PowerDNS/pdns/labels/dnsdist","name":"dnsdist","color":"bfd4f2"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-10-24T08:26:28Z","updated_at":"2016-10-24T12:35:43Z","closed_at":null,"body":"Hi,\r\n\r\nI'm trying the last dnsdist 1.1.0-beta1 in CentOS 7 and I can see that the file descriptors are not released. The dnsdist is installed using the repo.\r\n\r\nThis is the fd usage and the queries graphs for a week:\r\n\r\n![seleccion_021](https://cloud.githubusercontent.com/assets/378158/19637691/a46fa698-99d0-11e6-8a67-9dcb5ff59311.png)\r\n\r\n![seleccion_020](https://cloud.githubusercontent.com/assets/378158/19637714/bb788792-99d0-11e6-8923-16cf406698cf.png)\r\n\r\nAs you can see, the first days, when the file descriptors increased up to 4096 (default max open files configured in the systemd service) the dnsdist produced a segmentation fault and systemd restarted again. Then I modified the max fd up to 65000 just to check if we had too many connections, but as you can see the fd increased without releasing them. \r\n\r\nThe configuration for the dnsdist is:\r\n\r\n```\r\nnewServer({address=\"1.2.3.4:53\", name=\"pdns-server1\", pool=\"pool1\"})\r\nnewServer({address=\"5.6.7.8:53\", name=\"pdns-server2\", pool=\"pool1\"})\r\nnewServer({address=\"1.2.3.4:54\", name=\"pdns-recursor1\", pool=\"pool2\"})\r\nnewServer({address=\"5.6.7.8:54\", name=\"pdns-recursor2\", pool=\"pool2\"})\r\naddPoolRule({\"192.168.1.0/24\"}, \"pool1\")`\r\naddPoolRule({\"0.0.0.0/0\"}, \"pool2\")\r\nsetServerPolicy(roundrobin)\r\ncontrolSocket(\"127.0.0.1\")\r\naddLocal(\"0.0.0.0:53\", true, true)\r\nsetMaxTCPClientThreads(256)\r\nsetMaxUDPOutstanding(65535)\r\npc = newPacketCache(10000, 86400, 0, 60, 60)\r\ngetPool(\"pool1\"):setCache(pc)\r\ngetPool(\"pool2\"):setCache(pc)\r\naddACL(\"0.0.0.0/0\")\r\naddAction(NotRule(RecordsCountRule(DNSSection.Question, 1, 1)), RCodeAction(dnsdist.REFUSED))\r\nwebserver(\"1.2.3.4:8083\", \"xxxxxxxxx\", \"xxxxxxxxxx\")\r\ncarbonServer(\"2.2.2.2\",\"dnsdist1\",\"30\")\r\n```\r\n\r\nIt seems a bug with this new version.\r\n"},"comment":{"url":"https://api.github.com/repos/PowerDNS/pdns/issues/comments/255728003","html_url":"https://github.com/PowerDNS/pdns/issues/4605#issuecomment-255728003","issue_url":"https://api.github.com/repos/PowerDNS/pdns/issues/4605","id":255728003,"user":{"login":"rgacogne","id":1086257,"avatar_url":"https://avatars.githubusercontent.com/u/1086257?v=3","gravatar_id":"","url":"https://api.github.com/users/rgacogne","html_url":"https://github.com/rgacogne","followers_url":"https://api.github.com/users/rgacogne/followers","following_url":"https://api.github.com/users/rgacogne/following{/other_user}","gists_url":"https://api.github.com/users/rgacogne/gists{/gist_id}","starred_url":"https://api.github.com/users/rgacogne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgacogne/subscriptions","organizations_url":"https://api.github.com/users/rgacogne/orgs","repos_url":"https://api.github.com/users/rgacogne/repos","events_url":"https://api.github.com/users/rgacogne/events{/privacy}","received_events_url":"https://api.github.com/users/rgacogne/received_events","type":"User","site_admin":false},"created_at":"2016-10-24T12:35:43Z","updated_at":"2016-10-24T12:35:43Z","body":"Thank you again! Everything looks normal in the statistics you provided, and unfortunately there is not a single TCP connection in the `strace` dump. Could you try letting the `strace` run a little bit longer? I also forgot to ask earlier, but did you check if you have anything interesting in your logs?"}}
{"actor":{"display_login":"rgacogne"}}