From 3fcbde5fd0ef3fa6c6e6db1e5da8340a17f87ea7 Mon Sep 17 00:00:00 2001 From: Julien Pivotto Date: Mon, 3 Aug 2020 21:33:27 +0200 Subject: [PATCH] Disable HTTP/2 HTTP/2 support is golang has many problematic cornercases where dead connections would be kept. https://github.com/golang/go/issues/32388 https://github.com/golang/go/issues/39337 https://github.com/golang/go/issues/39750 I suggest we disable HTTP/2 for now and enable it manually on the blackbox exporter. Signed-off-by: Julien Pivotto --- config/http_config.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/config/http_config.go b/config/http_config.go index 9b1fad93..5c373d7a 100644 --- a/config/http_config.go +++ b/config/http_config.go @@ -29,7 +29,6 @@ import ( "time" "github.com/mwitkow/go-conntrack" - "golang.org/x/net/http2" "gopkg.in/yaml.v2" ) @@ -154,11 +153,6 @@ func NewRoundTripperFromConfig(cfg HTTPClientConfig, name string, disableKeepAli conntrack.DialWithName(name), ), } - // TODO: use ForceAttemptHTTP2 when we move to Go 1.13+. - err := http2.ConfigureTransport(rt.(*http.Transport)) - if err != nil { - return nil, err - } // If a bearer token is provided, create a round tripper that will set the // Authorization header correctly on each request.