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
We had a sudden workload spike lead to an increase of usage of direct memory buffers. The process hit the direct memory limit, and the jvm throws OutOfMemoryError[1]. Soon afterward, lettuce hits a NullPointerException in the CommandHandler [2] trying to check the ref count on a null buffer.
Current Behavior
Lettuce hits NullPointerException, and then connection checkouts fail with this same cause going forward, leading to an application hang
Being unable to allocate memory is not necessarily a recoverable situation, but this NPE seems like it is failing harder than it needs to. Ideally some operations would fail, reducing memory pressure, and allowing future forward progress.
Environment
Lettuce 6.5.1.RELEASE
Netty 4.1.115.Final
The text was updated successfully, but these errors were encountered:
The issue is we can easily fix this specific instance of the NPE, but I am not sure how many more exist in this situation.
Such a change is also very hard to verify as a fix too, so we will be shooting in the dark.
I generally agree we can improve the resilience of the driver in such conditions, so I will try to go over the code in the CommandHandler, but overall OOM can cause unpredictable and unforeseeable states of the driver.
Do let me know if you experience other such cases and we will try to address them too.
Thank you very much. I agree, this type of problem is difficult to chase down, and hard to prove if it is solved or even helped. It might be possible to reveal more information by stress-testing lettuce in intentionally low direct memory environments, but for our purposes, we raised the limit and hopefully won't see it again. Thanks again for the fix.
Bug Report
We had a sudden workload spike lead to an increase of usage of direct memory buffers. The process hit the direct memory limit, and the jvm throws OutOfMemoryError[1]. Soon afterward, lettuce hits a NullPointerException in the CommandHandler [2] trying to check the ref count on a null buffer.
Current Behavior
Lettuce hits NullPointerException, and then connection checkouts fail with this same cause going forward, leading to an application hang
Stack trace
Expected behavior
Being unable to allocate memory is not necessarily a recoverable situation, but this NPE seems like it is failing harder than it needs to. Ideally some operations would fail, reducing memory pressure, and allowing future forward progress.
Environment
The text was updated successfully, but these errors were encountered: