diff --git a/pkg/api/server.go b/pkg/api/server.go index c14351eb..ecad97a5 100644 --- a/pkg/api/server.go +++ b/pkg/api/server.go @@ -142,8 +142,12 @@ func (s *Server) startGRPC() error { grpc.Creds(insecure.NewCredentials()), grpc.UnaryInterceptor(middleware.ChainUnaryServer(unary...)), grpc.StreamInterceptor(middleware.ChainStreamServer(stream...)), + grpc.KeepaliveParams(keepalive.ServerParameters{ + Time: 5 * time.Minute, + }), grpc.KeepaliveEnforcementPolicy(keepalive.EnforcementPolicy{ - MinTime: 15 * time.Second, + PermitWithoutStream: true, + MinTime: 15 * time.Second, }), grpc.MaxRecvMsgSize(s.Config.Options.MaxMsgSize), }