diff --git a/kubernetes/etcd/debian/deb_folder/patches/0001-Increate-health-check-timeout.patch b/kubernetes/etcd/debian/deb_folder/patches/0001-Increate-health-check-timeout.patch new file mode 100644 index 000000000..b4152e691 --- /dev/null +++ b/kubernetes/etcd/debian/deb_folder/patches/0001-Increate-health-check-timeout.patch @@ -0,0 +1,33 @@ +From f909d99825d4364d271d757747ce47c016467e01 Mon Sep 17 00:00:00 2001 +From: Andy Ning +Date: Fri, 19 Apr 2024 11:28:39 -0400 +Subject: [PATCH] Increate health check timeout + +Under high load, the /health check QGET times out occasionally. +This change increase the timeout value to 5s. + +Signed-off-by: Andy Ning +--- + etcdserver/api/etcdhttp/metrics.go | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/etcdserver/api/etcdhttp/metrics.go b/etcdserver/api/etcdhttp/metrics.go +index e5c062e..74eec9a 100644 +--- a/etcdserver/api/etcdhttp/metrics.go ++++ b/etcdserver/api/etcdhttp/metrics.go +@@ -134,7 +134,11 @@ func checkHealth(srv etcdserver.ServerV2, excludedAlarms AlarmSet) Health { + } + + if h.Health == "true" { +- ctx, cancel := context.WithTimeout(context.Background(), time.Second) ++ time_out := time.Second*5 ++ plog.Warningf("/health check; QGET timeout: %d", time_out) ++ ++ //ctx, cancel := context.WithTimeout(context.Background(), time.Second) ++ ctx, cancel := context.WithTimeout(context.Background(), time_out) + _, err := srv.Do(ctx, etcdserverpb.Request{Method: "QGET"}) + cancel() + if err != nil { +-- +2.25.1 + diff --git a/kubernetes/etcd/debian/deb_folder/patches/series b/kubernetes/etcd/debian/deb_folder/patches/series new file mode 100644 index 000000000..766ca7647 --- /dev/null +++ b/kubernetes/etcd/debian/deb_folder/patches/series @@ -0,0 +1 @@ +0001-Increate-health-check-timeout.patch