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
Netty executor queue size is infinite resulting in GC pressure / OOM #1012
Comments
Try setting property |
I misread your message, so my comment above might not solve your issue. Try toying with Also, this will not solve your problems if you have badly designed streams that will indefinitely aggregate values. Small reproducible example and full stacktrace would be helpful. |
I should have been clearer: the executor in question is the so called |
So, it turns out that Riemann is using Note that the event executor group chooses an executor queue in a round robin fashion and each channel/socket is bound to an executor. This creates another performance problem as queueing in multiple queues is prone to higher latency and lower throughput (this is a known result in queueing theory - short explanation is that queue lengths have some variation so "evenly distributed" load will queue already overloaded queues). I assume this is done to preserve event ordering as events from the same client will be enqueued and handled in order, but this guarantee is not documented or promised anywhere in Riemann. |
Describe the bug
In cases of overload with many clients or clients which mishandle backpressure netty executor queue can grow without bounds consuming massive amounts of memory. This leads to the server experiencing GC pressure further aggravating the problem and ultimately OOM.
To Reproduce
Run Riemann with many clients or clients that have a very large number of outstanding requests and slow down streams so that a backlog is created.
Expected behavior
Netty executor queue size should be limited and excess messages should be dropped, in which case a special "overload" event should be injected into the streams. Alternatively (perhaps configurable?) TCP backpressure should be applied as last resort.
The text was updated successfully, but these errors were encountered: