Skip to content

Commit c43fd13

Browse files
authored
fix(agent): enable gRPC keep-alive (#6621)
* enable gRPC keep-alive * keep alive
1 parent 6db0eaf commit c43fd13

File tree

2 files changed

+2
-0
lines changed
  • scheduler/pkg

2 files changed

+2
-0
lines changed

scheduler/pkg/agent/modelserver_controlplane/oip/v2.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ func CreateV2GrpcConnection(v2Config V2Config) (*grpc.ClientConn, error) {
5151
}
5252

5353
opts := []grpc.DialOption{
54+
grpc.WithKeepaliveParams(util.GetClientKeepAliveParameters()),
5455
grpc.WithTransportCredentials(insecure.NewCredentials()),
5556
grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(v2Config.GRPCMaxMsgSizeBytes), grpc.MaxCallSendMsgSize(v2Config.GRPCMaxMsgSizeBytes)),
5657
grpc.WithStreamInterceptor(grpc_retry.StreamClientInterceptor(retryOpts...)),

scheduler/pkg/kafka/gateway/worker.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ func (iw *InferWorker) getGrpcClient(host string, port int) (v2.GRPCInferenceSer
124124
}
125125

126126
opts := []grpc.DialOption{
127+
grpc.WithKeepaliveParams(util.GetClientKeepAliveParameters()),
127128
grpc.WithTransportCredentials(creds),
128129
grpc.WithDefaultCallOptions(
129130
grpc.MaxCallRecvMsgSize(util.GRPCMaxMsgSizeBytes),

0 commit comments

Comments
 (0)