-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OOM when receiving large streaming requests #3173
Comments
If enabling request streaming it only takes one large request to kill the server... |
/bounty $250 |
💎 $250 bounty • ZIOSteps to solve:
Thank you for contributing to zio/zio-http! Add a bounty • Share on socials
|
/attempt #3173 Options |
💡 @davidlar submitted a pull request that claims the bounty. You can visit your bounty board to reward. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
We have a service that proxies large streams to different backends. It's compiled with GraalVM native-image and is running in docker with a quite small heap ~80Mb. It has worked fine for a long time but when we updated to zio-http 3.0.0 from 3.0.0-RC9 it started to get OOM instantly.
I did some investigation and the problem is the unbounded queue in AsyncBody.asStream that was introduced. It completely disables back pressure for incoming streams. So if the producer is faster than the consumer, the data will be buffered in the unbounded queue. This could lead to OOM.
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
It should work like it did before (but without blocking netty, of course)
The text was updated successfully, but these errors were encountered: