Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Host can log a grpc ConnectionAbortedException during normal shutdown #10572

Open
brettsam opened this issue Oct 25, 2024 · 0 comments
Open

Host can log a grpc ConnectionAbortedException during normal shutdown #10572

brettsam opened this issue Oct 25, 2024 · 0 comments

Comments

@brettsam
Copy link
Member

During a normal shutdown, the worker process may exit before the grpc connection has been gracefully terminated. We need to fix the ordering here so this doesn't happen. It causes noisy (and worrying) exceptions to be logged, when really this is just normal behavior, and the host is shutting down anyway.

The exception that can be seen is:

System.IO.IOException : The request stream was aborted. ---> Microsoft.AspNetCore.Connections.ConnectionAbortedException : The HTTP/2 connection faulted. ---> Microsoft.AspNetCore.Connections.ConnectionResetException : An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException : An existing connection was forcibly closed by the remote host.
   at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketAwaitableEventArgs.<GetResult>g__ThrowSocketException|5_0(SocketError e)
 ...snip...
   at async Grpc.AspNetCore.Server.Internal.HttpContextStreamReader`1.<MoveNext>g__MoveNextAsync|9_0[TRequest](??)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at async Microsoft.Azure.WebJobs.Script.Grpc.FunctionRpcService.EventStream(IAsyncStreamReader`1 requestStream,IServerStreamWriter`1 responseStream,ServerCallContext context) at /_/src/WebJobs.Script.Grpc/Server/FunctionRpcService.cs : 73
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant