{"action":"closed","issue":{"url":"https://api.github.com/repos/golang/go/issues/18112","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/18112/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/18112/comments","events_url":"https://api.github.com/repos/golang/go/issues/18112/events","html_url":"https://github.com/golang/go/issues/18112","id":192489572,"number":18112,"title":"net/http: concurrent HTTP2 client requests to a single nginx server returns GOAWAY NO_ERROR after a while","user":{"login":"fln","id":1325915,"avatar_url":"https://avatars.githubusercontent.com/u/1325915?v=3","gravatar_id":"","url":"https://api.github.com/users/fln","html_url":"https://github.com/fln","followers_url":"https://api.github.com/users/fln/followers","following_url":"https://api.github.com/users/fln/following{/other_user}","gists_url":"https://api.github.com/users/fln/gists{/gist_id}","starred_url":"https://api.github.com/users/fln/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fln/subscriptions","organizations_url":"https://api.github.com/users/fln/orgs","repos_url":"https://api.github.com/users/fln/repos","events_url":"https://api.github.com/users/fln/events{/privacy}","received_events_url":"https://api.github.com/users/fln/received_events","type":"User","site_admin":false},"labels":[{"id":373402289,"url":"https://api.github.com/repos/golang/go/labels/NeedsInvestigation","name":"NeedsInvestigation","color":"ededed","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-30T06:53:58Z","updated_at":"2016-12-06T19:49:53Z","closed_at":"2016-12-06T19:49:53Z","body":"### What version of Go are you using (`go version`)?\r\n\r\n`go version go1.7.3 linux/amd64`\r\n\r\n### What operating system and processor architecture are you using (`go env`)?\r\n\r\n```\r\nGOARCH=\"amd64\"\r\nGOBIN=\"\"\r\nGOEXE=\"\"\r\nGOHOSTARCH=\"amd64\"\r\nGOHOSTOS=\"linux\"\r\nGOOS=\"linux\"\r\nGOPATH=\"/home/folnin/go\"\r\nGORACE=\"\"\r\nGOROOT=\"/usr/local/go\"\r\nGOTOOLDIR=\"/usr/local/go/pkg/tool/linux_amd64\"\r\nCC=\"gcc\"\r\nGOGCCFLAGS=\"-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build294525165=/tmp/go-build -gno-record-gcc-switches\"\r\nCXX=\"g++\"\r\nCGO_ENABLED=\"1\"\r\n```\r\n\r\n### What did you do?\r\n\r\nHave multiple goroutines accessing single nginx server over HTTP2.\r\n\r\nDefault nginx installation will serve up to 1999 streams (1000 requests) over single HTTP2 TCP connection before returning GOAWAY and closing the connection. It is controlled by `http2_max_requests` directive. If multiple goroutines are making requests when server issues GOAWAY, reconnect is handled ungracefully and some goroutines receive error instead of requested content. If http client is used by single goroutine synchronously such errors never occur.\r\n\r\nExample code:\r\n\r\nhttps://play.golang.org/p/mPaBxuuRmm\r\n\r\nPlease note that this code will not work inside playground because of network access restrictions. It will work if executed locally. Example contains publicly accessible server that is operated by me. The error can be reproduced by connecting to nginx.com CDN as well (URL is commented out in the example) however it has much higher `http2_max_requests` configured and one have to wait much longer for the error to occur (~15k connections last time I tired).\r\n\r\n### What did you expect to see?\r\n\r\nApplication looping forever without errors (except network connectivity issues or server side errors).\r\n\r\n### What did you see instead?\r\n\r\nAfter ~1000 requests server tries to close TCP connection with GOAWAY, some requests are terminated with an error:\r\n\r\n`http2: server sent GOAWAY and closed the connection; LastStreamID=1999, ErrCode=NO_ERROR, debug=\"\"`\r\n\r\nIf only one goroutine is making requests this error never occurs."}}
{"actor":{"display_login":"bradfitz"}}