x/net/http2: http client closes stream prematurely if used concurrently · Issue #25652 · golang/go · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2018/05/31 03:23:57 [info] 32265#32265: *40872 client prematurely closed stream: only 0 out of 10000 bytes of request body received while sending request to upstream, client: 127.0.0.1, server: HOST, request: "POST /1 HTTP/2.0", upstream: "http://127.0.0.1:8544/1", host: "HOST"
In client stdout:
400 Bad Request
400 Bad Request
400 Bad Request
400 Bad Request
400 Bad Request
400 Bad Request
400 Bad Request
400 Bad Request
400 Bad Request
400 Bad Request
400 Bad Request
400 Bad Request
400 Bad Request
400 Bad Request
400 Bad Request
If each spawned goroutine got a separate http client, there are no errors:
$ http2-test --client --concurrent=false
Also there are no errors in stdout if http2 is disabled
However, there are a lot of entries like this in nginx error log:
client 127.0.0.1 closed keepalive connection
client closed connection while waiting for request, client: 127.0.0.1, server: 0.0.0.0:443
But those entries disappear with --concurrent=false.
I'm not sure about the cause of that issue and will be happy if someone reproduce it too.
The text was updated successfully, but these errors were encountered:
ernado
changed the title
x/net/http2: go client closes stream prematurely if used concurrently
x/net/http2: http client closes stream prematurely if used concurrently
May 31, 2018
Uh oh!
There was an error while loading. Please reload this page.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
I'm using go from tip. The go1.10.2 is affected too.
What operating system and processor architecture are you using (
go env
)?What did you do?
Put a simple http server behind nginx and tried to send http2 requests concurrently.
Sample client and server:
Nginc config:
I was running client like that:
What did you expect to see?
No errors in nginx log and client stdout.
What did you see instead?
In nginx error log:
In client stdout:
If each spawned goroutine got a separate http client, there are no errors:
Also there are no errors in stdout if http2 is disabled
$ export GODEBUG=http2client=0 $ http2-test --client
However, there are a lot of entries like this in nginx error log:
But those entries disappear with
--concurrent=false
.I'm not sure about the cause of that issue and will be happy if someone reproduce it too.
The text was updated successfully, but these errors were encountered: