From 0df89fee48888c30543da0a954ee1a611b7b9d14 Mon Sep 17 00:00:00 2001 From: Clayton Coleman Date: Mon, 18 Aug 2014 13:32:29 -0400 Subject: [PATCH] Make global http timeout longer than most operations We have a few long running operations today (sync=true, watch) that exceed the original default http.Server timeout. We should set the timeout to a high enough limit that more granular controls can be implemented. --- cmd/apiserver/apiserver.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/apiserver/apiserver.go b/cmd/apiserver/apiserver.go index 480e9b73ca..07741bd6d7 100644 --- a/cmd/apiserver/apiserver.go +++ b/cmd/apiserver/apiserver.go @@ -113,8 +113,8 @@ func main() { s := &http.Server{ Addr: net.JoinHostPort(*address, strconv.Itoa(int(*port))), Handler: apiserver.Handle(storage, codec, *apiPrefix), - ReadTimeout: 10 * time.Second, - WriteTimeout: 10 * time.Second, + ReadTimeout: 5 * time.Minute, + WriteTimeout: 5 * time.Minute, MaxHeaderBytes: 1 << 20, } glog.Fatal(s.ListenAndServe())