Skip to content

Commit

Permalink
cmd: crio: set ReadTimeout on the info endpoint
Browse files Browse the repository at this point in the history
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 <runcom@redhat.com>
  • Loading branch information
runcom committed Oct 29, 2017
1 parent 1544488 commit 6a912eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/crio/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"os/signal"
"sort"
"strings"
"time"

"github.com/containers/storage/pkg/reexec"
"github.com/kubernetes-incubator/cri-o/libkpod"
Expand Down Expand Up @@ -470,7 +471,8 @@ func main() {

infoMux := service.GetInfoMux()
srv := &http.Server{
Handler: infoMux,
Handler: infoMux,
ReadTimeout: 5 * time.Second,
}

graceful := false
Expand Down

0 comments on commit 6a912eb

Please sign in to comment.