Skip to content

Commit 35f5489

Browse files
committed
set gprc MaxConnectionIdle to 5 min (#4023)
1 parent ce1cfbd commit 35f5489

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

api/grpcserver.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@ var (
6565
PermitWithoutStream: true, // Allow pings even when there are no active streams
6666
}
6767
kasp = keepalive.ServerParameters{
68-
Time: 60 * time.Second, // Ping the client if it is idle for 60 seconds to ensure the connection is still active
69-
Timeout: 10 * time.Second, // Wait 10 seconds for the ping ack before assuming the connection is dead
68+
Time: 60 * time.Second, // Ping the client if it is idle for 60 seconds to ensure the connection is still active
69+
Timeout: 10 * time.Second, // Wait 10 seconds for the ping ack before assuming the connection is dead
70+
MaxConnectionIdle: 5 * time.Minute, // If a client is idle for 5 minutes, send a GOAWAY
7071
}
7172
)
7273

0 commit comments

Comments
 (0)