-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Memory leak #21
Comments
The problem seems to be with Another oddity I found is that the connection is never closed on exception. Even if |
read buffer bytes need to be discarded by decode()
Thanks for the memory leak fix. I'll make up my mind about exceptions on connections and the result of exceptions on the whole state. |
Thanks! |
Released lettuce 3.0.2.Final to maven central. |
Thx. An experimental feature could be close connection on internal errors, as you mentioned it. Will track it in #25 |
I found a better approach than closing the connection: Resetting the internal state. I updated #25 accordingly. |
The following code works for a while but stops receiving messages very quickly. When run without the debugger, I actually get the following error messages:
To expedite the process I limit JVM memory with
-Xmx32m
. However, I first discovered this issue while running a production server with 6GB heap size. It was under very low load and received a small message every 20 seconds. At some point I noticed messages were not being delivered anymore and the logs threw the same OOM errors. A heap dump showedbuffer
incom.lambdaworks.redis.protocol.CommanHandler
was a holding a contiguous 1GB array. It was trying to extend the buffer, but had no more huge contiguous blocks in the heap.I am weirdly unable to reproduce the OOM in a debugger. However, when running in a debugger, I still do get the same issue with messages not being received after a while.
I'll update this ticket once I have more information.
The text was updated successfully, but these errors were encountered: