From 96dc550223598dd5d984bb5fc222323ef239bed7 Mon Sep 17 00:00:00 2001 From: ale <ale@incal.net> Date: Sat, 9 Dec 2017 10:27:16 +0000 Subject: [PATCH] Increase the net/http IdleTimeout --- serverutil/http.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/serverutil/http.go b/serverutil/http.go index 9a72a78..b1d4b94 100644 --- a/serverutil/http.go +++ b/serverutil/http.go @@ -47,12 +47,15 @@ func Serve(h http.Handler, serverConfig *ServerConfig, addr string) (err error) } } + // These are not meant to be external-facing servers, so we + // can be generous with the timeouts to keep the number of + // reconnections low. srv := &http.Server{ Addr: addr, Handler: instrumentHandler(h), ReadTimeout: 30 * time.Second, WriteTimeout: 30 * time.Second, - IdleTimeout: 60 * time.Second, + IdleTimeout: 600 * time.Second, TLSConfig: tlsConfig, } -- GitLab