This repository was archived by the owner on Dec 18, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 523
Limit size of memory buffer when reading request #304
Comments
Or a |
Having a max read-ahead would be a good idea. Disabling request buffering would be a different thing- that would be to stop the server or middleware from remembering the body, to disable "seek" rewinding |
post RC2 |
mikeharder
added a commit
that referenced
this issue
Mar 11, 2016
mikeharder
added a commit
that referenced
this issue
Mar 11, 2016
mikeharder
added a commit
that referenced
this issue
Mar 11, 2016
mikeharder
added a commit
that referenced
this issue
Mar 14, 2016
mikeharder
added a commit
that referenced
this issue
Mar 29, 2016
mikeharder
added a commit
that referenced
this issue
Mar 30, 2016
mikeharder
added a commit
that referenced
this issue
Mar 30, 2016
mikeharder
added a commit
that referenced
this issue
Apr 5, 2016
mikeharder
added a commit
that referenced
this issue
Jun 1, 2016
mikeharder
added a commit
that referenced
this issue
Jun 1, 2016
mikeharder
added a commit
that referenced
this issue
Jun 4, 2016
22 tasks
mikeharder
added a commit
that referenced
this issue
Jun 6, 2016
mikeharder
added a commit
that referenced
this issue
Jun 7, 2016
mikeharder
added a commit
that referenced
this issue
Jun 9, 2016
mikeharder
added a commit
that referenced
this issue
Jun 9, 2016
mikeharder
added a commit
that referenced
this issue
Jun 14, 2016
mikeharder
added a commit
that referenced
this issue
Jun 14, 2016
mikeharder
added a commit
that referenced
this issue
Jun 14, 2016
- Added property `KestrelServerOptions.MaxRequestBufferSize` - Default is 1,048,576 bytes (1MB) - If value is null, the size of the request buffer is unlimited. - Fixed bug in `IConnectionControl.Resume()` where `_socket.ReadStart()` can throw if the socket is already disconnected. - Made `UvStreamHandle.ReadStop()` idempotent, to match `uv_read_stop()`.
Thanks @mikeharder! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
As @halter73 explained it to me, kestrel will constantly read the incoming request body off the socket and buffer it in memory until the application retrieves it. This could consume significant amounts of memory if the app isn't draining it fast enough.
Should Kestrel implement IHttpBufferingFeature.DisableRequestBuffering to stop preemptively buffering the request body and only read it on-demand? This would also let you put back-pressure on the client if they are sending data too quickly. This is also something that may make sense to enable/disable at startup.
The text was updated successfully, but these errors were encountered: