Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

Min rate applies to upgraded requests as well? #1904

Closed
davidfowl opened this issue Jun 17, 2017 · 3 comments
Closed

Min rate applies to upgraded requests as well? #1904

davidfowl opened this issue Jun 17, 2017 · 3 comments
Assignees

Comments

@davidfowl
Copy link
Member

davidfowl commented Jun 17, 2017

I can't remember if this was intentional but now it seems like websockets is broken. The application sent a single packet and then stopped (which is typical in these kinds of applications) and kestrel kills the connection because it dropped below the min rate.

info: Microsoft.AspNetCore.Server.Kestrel[27]
      Connection id "0HL5LFRPK4FA2", Request id "0HL5LFRPK4FA2:00000001": request body incoming data rate dropped below 1 bytes/second.
fail: Microsoft.AspNetCore.Sockets.ConnectionManager[0]
      Failed disposing connection 89673b87-85ff-447f-9ccd-e487c8377922
System.Net.WebSockets.WebSocketException (0x80004005): The remote party closed the WebSocket connection without completing the close handshake. ---> Microsoft.AspNetCore.Server.Kestrel.Core.BadHttpRequestException: Request timed out.
   at Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.PipeCompletion.ThrowFailed()
   at Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.Pipe.GetResult(ReadResult& result)
   at Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.Pipe.Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.IReadableBufferAwaiter.GetResult()
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.MessageBody.<ReadAsync>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.FrameRequestStream.<ReadAsyncInternal>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Net.WebSockets.ManagedWebSocket.<EnsureBufferContainsAsync>d__70.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Net.WebSockets.ManagedWebSocket.<ReceiveAsyncPrivate>d__61.MoveNext()

/cc @CesarBS @halter73

@davidfowl davidfowl changed the title Min rate applies to websocket requests as well? Min rate applies to upgraded requests as well? Jun 17, 2017
@cesarblum
Copy link
Contributor

It shouldn't apply to upgrade requests:

I'll take a look.

@cesarblum cesarblum self-assigned this Jun 19, 2017
@cesarblum
Copy link
Contributor

Found the bug, will send a PR soon.

@muratg @Eilon @DamianEdwards We need this for preview2.

@muratg
Copy link
Contributor

muratg commented Jun 19, 2017

(Approved for Preview2 in person)

@cesarblum cesarblum added this to the 2.0.0-preview2 milestone Jun 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants