linksplatform / Data.Doublets.Gql

The Unlicense
9 stars 1 forks source link

Error on CTRL+C shutdown #5

Open Konard opened 3 years ago

Konard commented 3 years ago
konard@konard:~/Archive/Code/Links/Data.Doublets.Gql/csharp/Platform.Data.Doublets.Gql.Server$ dotnet run
[20:01:33 INF] Starting host
Document name (default: db.links): 
[20:01:35 INF] Now listening on: http://localhost:60341
[20:01:35 INF] Application started. Press Ctrl+C to shut down.
[20:01:35 INF] Hosting environment: Development
[20:01:35 INF] Content root path: /home/konard/Archive/Code/Links/Data.Doublets.Gql/csharp/Platform.Data.Doublets.Gql.Server
[20:01:37 INF] Request starting HTTP/1.1 GET http://localhost:60341/graphql - -
[20:01:37 DBG] Connection is a valid websocket request
[20:01:37 DBG] Creating server for connection 0HMB4OLBE4KEL
[20:01:37 DBG] Connected...
[20:01:37 DBG] Creating writer pipeline
[20:01:37 DBG] Writer pipeline created
[20:01:37 DBG] Creating reader pipeline
[20:01:37 DBG] Reader pipeline created
[20:01:37 DBG] Message listeners:
GraphQL.Server.Transports.Subscriptions.Abstractions.LogMessagesListener
GraphQL.Server.Transports.Subscriptions.Abstractions.ProtocolMessageListener

[20:01:38 DBG] Handling message: null of type: connection_init
[20:01:38 DBG] Received message: Type: connection_init Id:  Payload: {}
[20:01:38 DBG] Handle init
[20:01:40 INF] Application is shutting down...
[20:01:45 ERR] An unhandled exception has occurred while executing the request.
System.AggregateException: One or more errors occurred. (One or more errors occurred. (The connection was aborted because the server is shutting down and request processing didn't complete within the time specified by HostOptions.ShutdownTimeout.))
 ---> System.AggregateException: One or more errors occurred. (The connection was aborted because the server is shutting down and request processing didn't complete within the time specified by HostOptions.ShutdownTimeout.)
 ---> Microsoft.AspNetCore.Connections.ConnectionAbortedException: The connection was aborted because the server is shutting down and request processing didn't complete within the time specified by HostOptions.ShutdownTimeout.
   at System.IO.Pipelines.PipeCompletion.ThrowLatchedException()
   at System.IO.Pipelines.Pipe.GetReadResult(ReadResult& result)
   at System.IO.Pipelines.Pipe.ReadAsync(CancellationToken token)
   at System.IO.Pipelines.Pipe.DefaultPipeReader.ReadAsync(CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1UpgradeMessageBody.ReadAsyncInternal(CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1UpgradeMessageBody.ReadAsync(CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpRequestStream.ReadAsyncInternal(Memory`1 destination, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   --- End of inner exception stack trace ---
   at GraphQL.Server.Transports.Subscriptions.Abstractions.SubscriptionServer.OnConnect() in /_/src/Transports.Subscriptions.Abstractions/SubscriptionServer.cs:line 48
   at GraphQL.Server.Transports.WebSockets.WebSocketConnection.Connect() in /_/src/Transports.Subscriptions.WebSockets/WebSocketConnection.cs:line 21
   at GraphQL.Server.Transports.WebSockets.GraphQLWebSocketsMiddleware`1.InvokeAsync(HttpContext context) in /_/src/Transports.Subscriptions.WebSockets/GraphQLWebSocketsMiddleware.cs:line 66
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
[20:01:45 WRN] The response has already started, the error page middleware will not be executed.
[20:01:45 ERR] Connection id "0HMB4OLBE4KEL", Request id "0HMB4OLBE4KEL:00000002": An unhandled exception was thrown by the application.
System.AggregateException: One or more errors occurred. (One or more errors occurred. (The connection was aborted because the server is shutting down and request processing didn't complete within the time specified by HostOptions.ShutdownTimeout.))
 ---> System.AggregateException: One or more errors occurred. (The connection was aborted because the server is shutting down and request processing didn't complete within the time specified by HostOptions.ShutdownTimeout.)
 ---> Microsoft.AspNetCore.Connections.ConnectionAbortedException: The connection was aborted because the server is shutting down and request processing didn't complete within the time specified by HostOptions.ShutdownTimeout.
   at System.IO.Pipelines.PipeCompletion.ThrowLatchedException()
   at System.IO.Pipelines.Pipe.GetReadResult(ReadResult& result)
   at System.IO.Pipelines.Pipe.ReadAsync(CancellationToken token)
   at System.IO.Pipelines.Pipe.DefaultPipeReader.ReadAsync(CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1UpgradeMessageBody.ReadAsyncInternal(CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1UpgradeMessageBody.ReadAsync(CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpRequestStream.ReadAsyncInternal(Memory`1 destination, CancellationToken cancellationToken)
   at System.Net.WebSockets.ManagedWebSocket.EnsureBufferContainsAsync(Int32 minimumRequiredBytes, CancellationToken cancellationToken, Boolean throwOnPrematureClosure)
   at System.Net.WebSockets.ManagedWebSocket.ReceiveAsyncPrivate[TWebSocketReceiveResultGetter,TWebSocketReceiveResult](Memory`1 payloadBuffer, CancellationToken cancellationToken, TWebSocketReceiveResultGetter resultGetter)
   at GraphQL.Server.Transports.WebSockets.WebSocketReaderPipeline.ReadMessageAsync(ITargetBlock`1 target) in /_/src/Transports.Subscriptions.WebSockets/WebSocketReaderPipeline.cs:line 112
   --- End of inner exception stack trace ---
   --- End of inner exception stack trace ---
   at GraphQL.Server.Transports.Subscriptions.Abstractions.SubscriptionServer.OnConnect() in /_/src/Transports.Subscriptions.Abstractions/SubscriptionServer.cs:line 48
   at GraphQL.Server.Transports.WebSockets.WebSocketConnection.Connect() in /_/src/Transports.Subscriptions.WebSockets/WebSocketConnection.cs:line 21
   at GraphQL.Server.Transports.WebSockets.GraphQLWebSocketsMiddleware`1.InvokeAsync(HttpContext context) in /_/src/Transports.Subscriptions.WebSockets/GraphQLWebSocketsMiddleware.cs:line 66
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
[20:01:45 INF] Request finished HTTP/1.1 GET http://localhost:60341/graphql - - - 101 - - 7205.9903ms
konard@konard:~/Archive/Code/Links/Data.Doublets.Gql/csharp/Platform.Data.Doublets.Gql.Server$ 

This only happens if clients are connected (all 4 in my case).