I have bi directional stream between client (dart) and server (.net). I got problem when client have big stream call loop
on server i get
System.IO.IOException: The request stream was aborted.
---> Microsoft.AspNetCore.Connections.ConnectionAbortedException: The HTTP/2 connection faulted.
--- End of inner exception stack trace ---
at System.IO.Pipelines.PipeCompletion.ThrowLatchedException()
at System.IO.Pipelines.Pipe.GetReadResult(ReadResult& result)
at System.IO.Pipelines.Pipe.GetReadAsyncResult()
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http2.Http2MessageBody.ReadAsync(CancellationToken cancellationToken)
at Grpc.AspNetCore.Server.Internal.PipeExtensions.ReadStreamMessageAsync[T](PipeReader input, HttpContextServerCallContext serverCallContext, Func`2 deserializer, CancellationToken cancellationToken)
and on client i get
gRPC Error (code: 2, codeName: UNKNOWN, message: HTTP/2 error: Stream error: Stream was terminated by peer (errorCode: 2)., details: null)
its working when small stream call loop.
i tried to increase MaxStreamsPerConnection but still not working
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.ConfigureKestrel(serveroption => {
serveroption.Limits.Http2.MaxStreamsPerConnection = 5000;
}).UseStartup<Startup>();
});
question from:
https://stackoverflow.com/questions/65857026/grpc-bi-directional-stream-was-terminated-by-peer-when-stream-call-loop-is-big 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…