Skip to content

Commit

Permalink
Set gRPC message length to int.MaxValue (#2778)
Browse files Browse the repository at this point in the history
  • Loading branch information
jviau authored Apr 1, 2024
1 parent fc427f1 commit 49d8656
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/WebJobs.Extensions.DurableTask/LocalGrpcListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,13 @@ public Task StartAsync(CancellationToken cancelToken = default)
int numAttempts = 1;
while (numAttempts <= maxAttempts)
{
this.grpcServer = new Server();
ChannelOption[] options = new[]
{
new ChannelOption(ChannelOptions.MaxReceiveMessageLength, int.MaxValue),
new ChannelOption(ChannelOptions.MaxSendMessageLength, int.MaxValue),
};

this.grpcServer = new Server(options);
this.grpcServer.Services.Add(P.TaskHubSidecarService.BindService(new TaskHubGrpcServer(this)));

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

0 comments on commit 49d8656

Please sign in to comment.