Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix streaming issue and upgrade Starlette
After a lot of debugging, I dug out, that streaming wasn't working because of BaseHTTPMiddleware, which it seems collects all the stream into memory and then returns it all at once with the response. That means, if you stream a lot of data, request will not give any answer until all data is collected into memory. This can take time and can result in read timeout or can simply run out of memory. Streaming was the main reason, why I chose Starlette, and one and most important thing didn't worked. Not good. But at least I found how to fix it. Related issues: encode/starlette#1012 encode/starlette#472
- Loading branch information
Showing
4 changed files
with
17 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters