Skip to content
Merged
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions sdks/go/pkg/beam/runners/prism/internal/jobservices/server.go
Original file line number Diff line number Diff 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 Down Expand 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
Collaborator Author

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