Comments (6)
The problem seems to be with PubSubCommandHandler.decode()
which never discards of read bytes in the buffer. It override the method that calls buffer.discardReadBytes()
in CommandHandler
but never calls buffer.discardReadBytes()
itself. This means the buffer will keep growing forever while receiving messages from channel subscription.
Another oddity I found is that the connection is never closed on exception. Even if RedisStateMachine.decode()
throws IllegalStateException
the connection keeps going. Resetting the connection on unknown exceptions would have at least cleared the buffer in this case and let the application keep running, assuming the connection watchdog is enabled.
from lettuce-core.
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.
from lettuce-core.
Thanks!
from lettuce-core.
Released lettuce 3.0.2.Final to maven central.
from lettuce-core.
Thx. An experimental feature could be close connection on internal errors, as you mentioned it. Will track it in #25
from lettuce-core.
I found a better approach than closing the connection: Resetting the internal state. I updated #25 accordingly.
from lettuce-core.
Related Issues (20)
- Questions about using Lettuce with parallelStream. HOT 4
- Bugs only in the scan command, Other commands can be executed, such as get, hget,keys HOT 3
- StatefulRedisClusterPubSubConnectionImpl's activated() method will report exception after resubscribe() was call. HOT 1
- Re-establish connections in the case of IP Address refresh in redis clusters HOT 4
- Lettuce - Automatic connection retry on startup HOT 4
- Docs on metrics (wiki) are misleading HOT 1
- Use of TimeoutOptions and SocketOptions Apparently Ignored (6.2.6.RELEASE) HOT 2
- OutOfDirectMemoryError: failed to allocate 16777216 byte(s) of direct memory HOT 1
- Does lettuce support ssubscribe/spublish in redis7.x HOT 1
- Netty IllegalReferenceCountException, this exception leads to redis command disorder HOT 4
- connect(..) failed: Can't assign requested address HOT 1
- Command timed while establishing the connection HOT 1
- SetArgs is need to add 'get' param HOT 2
- Inconsistency between timeoutSource and fixedTimeout HOT 1
- Spring boot - Lost of master and first sentinel node it causes READONLY exception HOT 1
- Upgrade to Micrometer 1.12.0
- Upgrade to netty 4.1.101.Final
- Upgrade to Micrometer 1.9.17
- Release Lettuce 6.2.7
- For Pub sub cluster using the io.lettuce.core.pubsub.PubSubCommandArgs, due which does not make use of hash and does not distribute the channels across shards HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lettuce-core.