Replies: 3 comments 12 replies
-
"10% of your managed exceptions" doesn't mean "happens 10% of the time". Presumably a lot of things result in no exceptions whatsoever? |
Beta Was this translation helpful? Give feedback.
-
Looks like you're calling RequestClose after the connection ends? It's being called from a timer thread and is likely unsynchronized with the connection ending. |
Beta Was this translation helpful? Give feedback.
-
Exactly, after reading existing code and solution you mentioned above realized we are not doing whats expected. We do have services where we expect long lived connection, do we have better solution to close long lived connections after certain time gracefully? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When looking at perf issues came across ObjectDisposed exceptions from Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.KestrelConnection!RequestClose
And these ObjectDisposed exception are contributing ~10% of total exceptions. When looked at code KestrelConnection::RequestClose() There is comment about race condition - but this race condition is happening more than 10% of managed exceptions, can we somehow avoid these exceptions?
Entire stack

Beta Was this translation helpful? Give feedback.
All reactions