From 6a912eb2d3d3d287ef3825833344c0a4acc447a5 Mon Sep 17 00:00:00 2001 From: Antonio Murdaca Date: Sun, 29 Oct 2017 21:56:54 +0100 Subject: [PATCH] cmd: crio: set ReadTimeout on the info endpoint This will avoid the goroutines leak we've been seeing during performance tests. Goroutines count returns to normal after containers cleanup. Signed-off-by: Antonio Murdaca --- cmd/crio/main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/crio/main.go b/cmd/crio/main.go index 95289956..f7856c7f 100644 --- a/cmd/crio/main.go +++ b/cmd/crio/main.go @@ -10,6 +10,7 @@ import ( "os/signal" "sort" "strings" + "time" "github.com/containers/storage/pkg/reexec" "github.com/kubernetes-incubator/cri-o/libkpod" @@ -470,7 +471,8 @@ func main() { infoMux := service.GetInfoMux() srv := &http.Server{ - Handler: infoMux, + Handler: infoMux, + ReadTimeout: 5 * time.Second, } graceful := false