-
Notifications
You must be signed in to change notification settings - Fork 72
Handle and log OperationCanceledExceptions thrown due to client disconnects #150
Comments
@halter73 what happened to all the comments? |
They're in the old issue. Would you prefer I close this and reopen with comments? |
Or re-word this one to explain the proposal |
Ideally the client disconnect log message would have a LogLevel lower than error, since the main motivation for this issue is to clean up logs. I would go with LogLevel.Information, since that is how Kestrel logs most connection errors. It might also be helpful to indicate what file was being served. |
I personally think it should be debug. |
The other thing to sort out here is OperationCancelledException vs TaskCanceledException. Kestrel uses the former and WebListener the later. |
@Tratcher Did you mean that Kestrel uses the latter |
The OperationCanceledException may be coming directly from StreamCopyOperation |
TaskCanceledException derives from OperationCanceledException, so anything that deals with OCE will also handle TCE |
Sure, but anything that Kestrel throws directly will be the derived type. |
If I understood the code correctly, you ended up making the log debug as I suggested, right? |
From @anpete on April 14, 2016 5:32
Not sure if this is expected, so filing just in case. While investigating our internal MusicStore stress scenario I'm seeing an OperationCanceledException raised occasionally when the number of clients > ~50.
Stack:
Copied from original issue: aspnet/KestrelHttpServer#748
The text was updated successfully, but these errors were encountered: