Skip to content

x/net/http2: Transport returning "http2: no cached connection was available" #16582

Closed
@russ-

Description

@russ-
  1. What version of Go are you using (go version)?
    go version go1.7rc3 darwin/amd64
  2. What operating system and processor architecture are you using (go env)?
    GOARCH="amd64"
    GOBIN=""
    GOEXE=""
    GOHOSTARCH="amd64"
    GOHOSTOS="darwin"
    GOOS="darwin"
    GOPATH="/Users/rra/dev"
    GORACE=""
    GOROOT="/Users/rra/opt/homebrew/Cellar/go/1.7rc3/libexec"
    GOTOOLDIR="/Users/rra/opt/homebrew/Cellar/go/1.7rc3/libexec/pkg/tool/darwin_amd64"
    CC="clang"
    GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/00/1m160000h01000cxqpysvccm006h4r/T/go-build956765444=/tmp/go-build -gno-record-gcc-switches -fno-common"
    CXX="clang++"
    CGO_ENABLED="1"
  3. What did you do?
    I'm seeing "http2: no cached connection was available" failures from http.Client when I start many (~hundreds) requests at once.

Run https://play.golang.org/p/zKthX7Y9RW with GODEBUG=http2client=0 and GODEBUG=http2client=1 to see the behavior difference.

  1. What did you expect to see?
    With http2 enabled, I expect to see requests queue up and eventually succeed.
  2. What did you see instead?
    Some requests fail with "http2: no cached connection was available".

See also https://groups.google.com/d/msg/golang-nuts/aw0vboyE1pA/DkOdf_5tDgAJ

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions