From 69bf1d8286d4dd653ba01a7022981f95e1cfca70 Mon Sep 17 00:00:00 2001 From: Manuel de Brito Fontes Date: Thu, 18 Jan 2018 17:55:56 -0300 Subject: [PATCH] Increase timeouts to run pprof --- cmd/nginx/main.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cmd/nginx/main.go b/cmd/nginx/main.go index c31bb4cea..a3a09e37a 100644 --- a/cmd/nginx/main.go +++ b/cmd/nginx/main.go @@ -276,10 +276,12 @@ func registerHandlers(enableProfiling bool, port int, ic *controller.NGINXContro } server := &http.Server{ - Addr: fmt.Sprintf(":%v", port), - Handler: mux, - ReadTimeout: 10 * time.Second, - WriteTimeout: 30 * time.Second, + Addr: fmt.Sprintf(":%v", port), + Handler: mux, + ReadTimeout: 10 * time.Second, + ReadHeaderTimeout: 10 * time.Second, + WriteTimeout: 300 * time.Second, + IdleTimeout: 120 * time.Second, } glog.Fatal(server.ListenAndServe()) }