Skip to content

Commit 49d8656

Browse files
authored
Set gRPC message length to int.MaxValue (#2778)
1 parent fc427f1 commit 49d8656

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/WebJobs.Extensions.DurableTask/LocalGrpcListener.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,13 @@ public Task StartAsync(CancellationToken cancelToken = default)
5454
int numAttempts = 1;
5555
while (numAttempts <= maxAttempts)
5656
{
57-
this.grpcServer = new Server();
57+
ChannelOption[] options = new[]
58+
{
59+
new ChannelOption(ChannelOptions.MaxReceiveMessageLength, int.MaxValue),
60+
new ChannelOption(ChannelOptions.MaxSendMessageLength, int.MaxValue),
61+
};
62+
63+
this.grpcServer = new Server(options);
5864
this.grpcServer.Services.Add(P.TaskHubSidecarService.BindService(new TaskHubGrpcServer(this)));
5965

6066
int listeningPort = numAttempts == 1 ? DefaultPort : this.GetRandomPort();

0 commit comments

Comments
 (0)