mirror of https://github.com/linkerd/linkerd2.git
remove admin server timeouts (#4350)
The Linkerd control plane components' admin servers have an idle connection timeout of 10 seconds. This means that they will close connections which have been idle for 10 seconds. These components are also configured with a 10 second period for liveness checks. This introduces a race condition where connections will be idle for approximately 10 seconds between liveness checks and can idle out, potentially causing the next liveness check to fail. We remove the idle timeout so that the connection stays alive.
This commit is contained in:
parent
f62a2e6ee4
commit
a3c42b1380
|
@ -5,7 +5,6 @@ import (
|
|||
"net/http"
|
||||
"net/http/pprof"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
@ -23,14 +22,7 @@ func StartServer(addr string) {
|
|||
promHandler: promhttp.Handler(),
|
||||
}
|
||||
|
||||
s := &http.Server{
|
||||
Addr: addr,
|
||||
Handler: h,
|
||||
ReadTimeout: 10 * time.Second,
|
||||
WriteTimeout: 10 * time.Second,
|
||||
}
|
||||
|
||||
log.Fatal(s.ListenAndServe())
|
||||
log.Fatal(http.ListenAndServe(addr, h))
|
||||
}
|
||||
|
||||
func (h *handler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
||||
|
|
Loading…
Reference in New Issue