When running the metrics stream middleware, we occasionally see the following error in the logs generated by the framework:
Cannot access a disposed object.
Object name: 'WriteReqPool'.
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'WriteReqPool'.
at Microsoft.AspNetCore.Server.Kestrel.Internal.Infrastructure.WriteReqPool.Allocate()
at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.SocketOutput.WriteContext.DoWriteIfNeeded()
at Microsoft.AspNetCore.Server.Kestrel.Internal.Http.SocketOutput.WriteAllPending()
at Microsoft.AspNetCore.Server.Kestrel.Internal.KestrelThread.DoPostWork()
When running the metrics stream middleware, we occasionally see the following error in the logs generated by the framework:
Doesn't seem to cause any actual problems though. We have to figure out if we do something incorrectly in the middleware, or this is another problem (like https://github.com/aspnet/KestrelHttpServer/issues/1402#event-979278556) in Kestrel itself.