From 10414fd81c2744b2b031f4d2f8a935b614d702f1 Mon Sep 17 00:00:00 2001 From: chrislu Date: Tue, 23 Aug 2022 23:28:16 -0700 Subject: [PATCH] ping timeout at 15 seconds this 72 minute timeout setting seems unreasonably long 15 seconds is around the time when a new raft leader should be elected. --- weed/server/master_server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/server/master_server.go b/weed/server/master_server.go index 9adcafc6f..feee59455 100644 --- a/weed/server/master_server.go +++ b/weed/server/master_server.go @@ -361,7 +361,7 @@ func (ms *MasterServer) OnPeerUpdate(update *master_pb.ClusterNodeUpdate, startF } } else { pb.WithMasterClient(false, peerAddress, ms.grpcDialOption, true, func(client master_pb.SeaweedClient) error { - ctx, cancel := context.WithTimeout(context.TODO(), time.Minute*72) + ctx, cancel := context.WithTimeout(context.TODO(), 15*time.Second) defer cancel() if _, err := client.Ping(ctx, &master_pb.PingRequest{Target: string(peerAddress), TargetType: cluster.MasterType}); err != nil { glog.V(0).Infof("master %s didn't respond to pings. remove raft server", peerName)