Skip to content

Commit

Permalink
setting read/write http timeouts (#113)
Browse files Browse the repository at this point in the history
by default these timeouts are off, it means that clients
can hold up connections indefinitely this in turn can
potentially use up all available connections in a pool.
  • Loading branch information
p0lyn0mial committed Feb 27, 2018
1 parent e5070f0 commit 8d11e84
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,10 @@ func createUtilHttpServer(kubeClient *kubernetes.Clientset, kubeconfigProvider c
m.Handle("/ready", http.HandlerFunc(health.ReadyEndpoint))

return &http.Server{
Addr: listenAddress,
Handler: m,
Addr: listenAddress,
Handler: m,
ReadTimeout: 5 * time.Second,
WriteTimeout: 10 * time.Second,
}
}

Expand Down

0 comments on commit 8d11e84

Please sign in to comment.