From 275e9a4e86448e584481ea525b6ee29538165b2b Mon Sep 17 00:00:00 2001 From: Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.com> Date: Mon, 14 Feb 2022 21:38:24 +0500 Subject: [PATCH 1/2] reduce to default http server KillTimeout and StopTimeout --- weed/command/volume.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weed/command/volume.go b/weed/command/volume.go index 5b9d94b9a..3a81bce18 100644 --- a/weed/command/volume.go +++ b/weed/command/volume.go @@ -364,8 +364,8 @@ func (v VolumeServerOptions) startClusterHttpService(handler http.Handler) httpd } httpDown := httpdown.HTTP{ - KillTimeout: 5 * time.Minute, - StopTimeout: 5 * time.Minute, + KillTimeout: time.Minute, + StopTimeout: time.Minute, CertFile: certFile, KeyFile: keyFile} clusterHttpServer := httpDown.Serve(&http.Server{Handler: handler}, listener) From 526094d2dad38b78b8d5d2c7e13a7e24d1bef138 Mon Sep 17 00:00:00 2001 From: Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.com> Date: Mon, 14 Feb 2022 21:42:27 +0500 Subject: [PATCH 2/2] StopTimeout 30 sec --- weed/command/volume.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/command/volume.go b/weed/command/volume.go index 3a81bce18..20935bf16 100644 --- a/weed/command/volume.go +++ b/weed/command/volume.go @@ -365,7 +365,7 @@ func (v VolumeServerOptions) startClusterHttpService(handler http.Handler) httpd httpDown := httpdown.HTTP{ KillTimeout: time.Minute, - StopTimeout: time.Minute, + StopTimeout: 30 * time.Second, CertFile: certFile, KeyFile: keyFile} clusterHttpServer := httpDown.Serve(&http.Server{Handler: handler}, listener)