{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/18753","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/18753/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/18753/comments","events_url":"https://api.github.com/repos/golang/go/issues/18753/events","html_url":"https://github.com/golang/go/issues/18753","id":202411585,"number":18753,"title":"net/http: benchmarks fail on sierra with 'too many open files'","user":{"login":"josharian","id":67496,"avatar_url":"https://avatars1.githubusercontent.com/u/67496?v=3","gravatar_id":"","url":"https://api.github.com/users/josharian","html_url":"https://github.com/josharian","followers_url":"https://api.github.com/users/josharian/followers","following_url":"https://api.github.com/users/josharian/following{/other_user}","gists_url":"https://api.github.com/users/josharian/gists{/gist_id}","starred_url":"https://api.github.com/users/josharian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josharian/subscriptions","organizations_url":"https://api.github.com/users/josharian/orgs","repos_url":"https://api.github.com/users/josharian/repos","events_url":"https://api.github.com/users/josharian/events{/privacy}","received_events_url":"https://api.github.com/users/josharian/received_events","type":"User","site_admin":false},"labels":[{"id":373399998,"url":"https://api.github.com/repos/golang/go/labels/NeedsFix","name":"NeedsFix","color":"ededed","default":false},{"id":373402289,"url":"https://api.github.com/repos/golang/go/labels/NeedsInvestigation","name":"NeedsInvestigation","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/49","html_url":"https://github.com/golang/go/milestone/49","labels_url":"https://api.github.com/repos/golang/go/milestones/49/labels","id":2053058,"number":49,"title":"Go1.9","description":"","creator":{"login":"rsc","id":104030,"avatar_url":"https://avatars2.githubusercontent.com/u/104030?v=3","gravatar_id":"","url":"https://api.github.com/users/rsc","html_url":"https://github.com/rsc","followers_url":"https://api.github.com/users/rsc/followers","following_url":"https://api.github.com/users/rsc/following{/other_user}","gists_url":"https://api.github.com/users/rsc/gists{/gist_id}","starred_url":"https://api.github.com/users/rsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsc/subscriptions","organizations_url":"https://api.github.com/users/rsc/orgs","repos_url":"https://api.github.com/users/rsc/repos","events_url":"https://api.github.com/users/rsc/events{/privacy}","received_events_url":"https://api.github.com/users/rsc/received_events","type":"User","site_admin":false},"open_issues":533,"closed_issues":303,"state":"open","created_at":"2016-10-06T18:17:55Z","updated_at":"2017-04-19T00:36:52Z","due_on":"2017-07-31T07:00:00Z","closed_at":null},"comments":9,"created_at":"2017-01-22T21:31:57Z","updated_at":"2017-04-19T10:48:21Z","closed_at":null,"body":"Sample run excerpt:\r\n\r\n```bash\r\nBenchmarkCookieString-8                      \t 2000000\t       900 ns/op\t     384 B/op\t       3 allocs/op\r\nBenchmarkReadSetCookies-8                    \t  500000\t      3703 ns/op\t     960 B/op\t      17 allocs/op\r\nBenchmarkReadCookies-8                       \t  300000\t      4948 ns/op\t    2008 B/op\t      16 allocs/op\r\nBenchmarkHeaderWriteSubset-8                 \t 3000000\t       545 ns/op\t       0 B/op\t       0 allocs/op\r\nBenchmarkReadRequestChrome-8                 \t  500000\t      3187 ns/op\t 191.68 MB/s\t    1809 B/op\t      14 allocs/op\r\nBenchmarkReadRequestCurl-8                   \t 1000000\t      1663 ns/op\t  46.90 MB/s\t     880 B/op\t       9 allocs/op\r\nBenchmarkReadRequestApachebench-8            \t 1000000\t      1670 ns/op\t  49.10 MB/s\t     883 B/op\t       9 allocs/op\r\nBenchmarkReadRequestSiege-8                  \t 1000000\t      2161 ns/op\t  69.87 MB/s\t     965 B/op\t      11 allocs/op\r\nBenchmarkReadRequestWrk-8                    \t 1000000\t      1682 ns/op\t  23.78 MB/s\t     832 B/op\t       7 allocs/op\r\nBenchmarkClientServer-8                      \t   20000\t     71011 ns/op\t    4962 B/op\t      67 allocs/op\r\nBenchmarkClientServerParallel4-8             \t  100000\t     15276 ns/op\t    4937 B/op\t      64 allocs/op\r\nBenchmarkClientServerParallel64-8            \t2017/01/22 11:19:46 http: Accept error: accept tcp 127.0.0.1:60387: accept: too many open files; retrying in 5ms\r\n2017/01/22 11:19:46 http: Accept error: accept tcp 127.0.0.1:60387: accept: too many open files; retrying in 5ms\r\n2017/01/22 11:19:46 http: Accept error: accept tcp 127.0.0.1:60387: accept: too many open files; retrying in 10ms\r\n2017/01/22 11:19:46 http: Accept error: accept tcp 127.0.0.1:60387: accept: too many open files; retrying in 20ms\r\n2017/01/22 11:19:46 http: Accept error: accept tcp 127.0.0.1:60387: accept: too many open files; retrying in 40ms\r\n2017/01/22 11:19:46 http: Accept error: accept tcp 127.0.0.1:60387: accept: too many open files; retrying in 80ms\r\n2017/01/22 11:19:46 http: Accept error: accept tcp 127.0.0.1:60387: accept: too many open files; retrying in 5ms\r\n   10000\t    135870 ns/op\t    4749 B/op\t      63 allocs/op\r\n--- BENCH: BenchmarkClientServerParallel64-8\r\n\tserve_test.go:4494: Get: Get http://127.0.0.1:60387: dial tcp 127.0.0.1:60387: socket: too many open files\r\n\tserve_test.go:4494: Get: Get http://127.0.0.1:60387: dial tcp 127.0.0.1:60387: socket: too many open files\r\n\tserve_test.go:4494: Get: Get http://127.0.0.1:60387: dial tcp 127.0.0.1:60387: socket: too many open files\r\n\tserve_test.go:4494: Get: Get http://127.0.0.1:60387: dial tcp 127.0.0.1:60387: socket: too many open files\r\n\tserve_test.go:4494: Get: Get http://127.0.0.1:60387: dial tcp 127.0.0.1:60387: socket: too many open files\r\n\tserve_test.go:4494: Get: Get http://127.0.0.1:60387: dial tcp 127.0.0.1:60387: socket: too many open files\r\n\tserve_test.go:4494: Get: Get http://127.0.0.1:60387: dial tcp 127.0.0.1:60387: socket: too many open files\r\n\tserve_test.go:4494: Get: Get http://127.0.0.1:60387: dial tcp 127.0.0.1:60387: socket: too many open files\r\n\tserve_test.go:4494: Get: Get http://127.0.0.1:60387: dial tcp 127.0.0.1:60387: socket: too many open files\r\n\tserve_test.go:4494: Get: Get http://127.0.0.1:60387: dial tcp 127.0.0.1:60387: socket: too many open files\r\n\t... [output truncated]\r\nBenchmarkClientServerParallelTLS4-8          \t  100000\t     15757 ns/op\t    4945 B/op\t      64 allocs/op\r\nBenchmarkClientServerParallelTLS64-8         \t2017/01/22 11:19:49 http: Accept error: accept tcp 127.0.0.1:60976: accept: too many open files; retrying in 5ms\r\n2017/01/22 11:19:49 http: Accept error: accept tcp 127.0.0.1:60976: accept: too many open files; retrying in 5ms\r\n2017/01/22 11:19:49 http: Accept error: accept tcp 127.0.0.1:60976: accept: too many open files; retrying in 10ms\r\n2017/01/22 11:19:49 http: Accept error: accept tcp 127.0.0.1:60976: accept: too many open files; retrying in 20ms\r\n2017/01/22 11:19:49 http: Accept error: accept tcp 127.0.0.1:60976: accept: too many open files; retrying in 40ms\r\n2017/01/22 11:19:49 http: Accept error: accept tcp 127.0.0.1:60976: accept: too many open files; retrying in 5ms\r\n2017/01/22 11:19:50 http: Accept error: accept tcp 127.0.0.1:60976: accept: too many open files; retrying in 5ms\r\n2017/01/22 11:19:50 http: Accept error: accept tcp 127.0.0.1:60976: accept: too many open files; retrying in 5ms\r\n2017/01/22 11:19:50 http: Accept error: accept tcp 127.0.0.1:60976: accept: too many open files; retrying in 5ms\r\n2017/01/22 11:19:50 http: Accept error: accept tcp 127.0.0.1:60976: accept: too many open files; retrying in 5ms\r\n2017/01/22 11:19:50 http: Accept error: accept tcp 127.0.0.1:60976: accept: too many open files; retrying in 5ms\r\n2017/01/22 11:19:50 http: Accept error: accept tcp 127.0.0.1:60976: accept: too many open files; retrying in 5ms\r\n    5000\t    475368 ns/op\t    6175 B/op\t      80 allocs/op\r\n--- BENCH: BenchmarkClientServerParallelTLS64-8\r\n\tserve_test.go:4494: Get: Get https://127.0.0.1:60976: dial tcp 127.0.0.1:60976: socket: too many open files\r\n\tserve_test.go:4494: Get: Get https://127.0.0.1:60976: dial tcp 127.0.0.1:60976: socket: too many open files\r\n\tserve_test.go:4494: Get: Get https://127.0.0.1:60976: dial tcp 127.0.0.1:60976: socket: too many open files\r\n\tserve_test.go:4494: Get: Get https://127.0.0.1:60976: dial tcp 127.0.0.1:60976: socket: too many open files\r\n\tserve_test.go:4494: Get: Get https://127.0.0.1:60976: dial tcp 127.0.0.1:60976: socket: too many open files\r\n\tserve_test.go:4494: Get: Get https://127.0.0.1:60976: dial tcp 127.0.0.1:60976: socket: too many open files\r\n\tserve_test.go:4494: Get: Get https://127.0.0.1:60976: dial tcp 127.0.0.1:60976: socket: too many open files\r\n\tserve_test.go:4494: Get: Get https://127.0.0.1:60976: dial tcp 127.0.0.1:60976: socket: too many open files\r\n\tserve_test.go:4494: Get: Get https://127.0.0.1:60976: dial tcp 127.0.0.1:60976: socket: too many open files\r\n\tserve_test.go:4494: Get: Get https://127.0.0.1:60976: dial tcp 127.0.0.1:60976: socket: too many open files\r\n\t... [output truncated]\r\nBenchmarkServer-8                            \t   20000\t     75523 ns/op\t    2341 B/op\t      21 allocs/op\r\nBenchmarkClient-8                            \t   20000\t     72795 ns/op\t    3351 B/op\t      50 allocs/op\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/295214363","html_url":"https://github.com/golang/go/issues/18753#issuecomment-295214363","issue_url":"https://api.github.com/repos/golang/go/issues/18753","id":295214363,"user":{"login":"mahadevTW","id":16661470,"avatar_url":"https://avatars3.githubusercontent.com/u/16661470?v=3","gravatar_id":"","url":"https://api.github.com/users/mahadevTW","html_url":"https://github.com/mahadevTW","followers_url":"https://api.github.com/users/mahadevTW/followers","following_url":"https://api.github.com/users/mahadevTW/following{/other_user}","gists_url":"https://api.github.com/users/mahadevTW/gists{/gist_id}","starred_url":"https://api.github.com/users/mahadevTW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mahadevTW/subscriptions","organizations_url":"https://api.github.com/users/mahadevTW/orgs","repos_url":"https://api.github.com/users/mahadevTW/repos","events_url":"https://api.github.com/users/mahadevTW/events{/privacy}","received_events_url":"https://api.github.com/users/mahadevTW/received_events","type":"User","site_admin":false},"created_at":"2017-04-19T10:48:21Z","updated_at":"2017-04-19T10:48:21Z","body":"I see same issue on centos ,Ulimit open files is 10,000.\r\nin my case: \r\nCode looks like:   \r\n`func someHandler(request, response) {\r\n      for v := range obj.GetSomeChannel() {\r\n          go v.requestSomeHttpServer()\r\n          //v.request is again one more http call to.\r\n  }\r\n}\r\n`\r\nand this someHandler is getting called multiple times because it serves user front service.\r\n\r\nNow , v.requestSomeHttpServer is not able to serve because there are multiple request which hitting and it is throwing **too many open files.**\r\n\r\n"}}
{"actor":{"display_login":"mahadevTW"}}