You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When streaming a large (20+ MB) request body to a controller that writes it to a file on disk the Request.Body.AsyncSequenceDelegate method produceMore0() encounters a noSignalReceived case and the server exits with a preconditionFailure().
Having the server spontaneously exit in production is highly undesirable.
It's not completely clear why noSignalReceived is occurring, but experimentally replacing the preconditionFailure() with break appears to allow the server to wait for additional data to arrive from the client, allowing the remainder of the body to be received and stored.
Please consider adjusting the implementation of the Request.Body.AsyncSequenceDelegate method produceMore0() such that the server will not spontaneously terminate when streaming a large request body.
To Reproduce
Steps to reproduce the behavior:
A route with configured with body: .stream
A controller method that handles the 20+ MB streamed body using the for try await byteBuffer in body {} pattern.
As the streamed bytes are received at some point the Request.Body.AsyncSequenceDelegate method produceMore0() encounters a noSignalReceived case and the server exits with a preconditionFailure().
Environment
Vapor Framework version: 4.92.2
The text was updated successfully, but these errors were encountered:
Describe the bug
When streaming a large (20+ MB) request body to a controller that writes it to a file on disk the
Request.Body.AsyncSequenceDelegate
methodproduceMore0()
encounters anoSignalReceived
case and the server exits with apreconditionFailure()
.Having the server spontaneously exit in production is highly undesirable.
It's not completely clear why
noSignalReceived
is occurring, but experimentally replacing thepreconditionFailure()
withbreak
appears to allow the server to wait for additional data to arrive from the client, allowing the remainder of the body to be received and stored.Please consider adjusting the implementation of the
Request.Body.AsyncSequenceDelegate
methodproduceMore0()
such that the server will not spontaneously terminate when streaming a large request body.To Reproduce
Steps to reproduce the behavior:
body: .stream
for try await byteBuffer in body {}
pattern.Request.Body.AsyncSequenceDelegate
methodproduceMore0()
encounters anoSignalReceived
case and the server exits with apreconditionFailure()
.Environment
The text was updated successfully, but these errors were encountered: