Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
Expand Up@@ -30,6 +30,7 @@ import (
jobpb "github.com/apache/beam/sdks/v2/go/pkg/beam/model/jobmanagement_v1"
"github.com/apache/beam/sdks/v2/go/pkg/beam/runners/prism/internal/worker"
"google.golang.org/grpc"
"google.golang.org/grpc/keepalive"
)

type Server struct {
Expand DownExpand Up@@ -80,6 +81,10 @@ func NewServer(port int, execute func(*Job)) *Server {
s.logger.Info("Serving JobManagement", slog.String("endpoint", s.Endpoint()))
opts := []grpc.ServerOption{
grpc.MaxRecvMsgSize(math.MaxInt32),
grpc.KeepaliveEnforcementPolicy(keepalive.EnforcementPolicy{
MinTime: 20 * time.Second, // Minimum duration a client should wait before sending a keepalive ping

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PermitWithoutStream: true, // Allow pings even if there are no active streams
}),
}
s.server = grpc.NewServer(opts...)
jobpb.RegisterJobServiceServer(s.server, s)
Expand Down
Loading