redis / lettuce

Advanced Java Redis client for thread-safe sync, async, and reactive usage. Supports Cluster, Sentinel, Pipelining, and codecs.
https://lettuce.io
MIT License
5.3k stars 949 forks source link

After a machine in the Redis cluster crashes, a large number of RedisClusterNode instances will be created in the service, but they cannot be recycled, resulting in the service being continuously full GC #2802

Open yuanyunlu opened 3 months ago

yuanyunlu commented 3 months ago

Current Behavior

hi @mp911de , In the production environment, a Redis machine crashed and the service successfully enabled the topology refresh function. One day later, our machine had not yet recovered, but the service experienced high CPU. After analyzing the heap dump files, it was found that a large number of RedisClusterNode objects were created, and the JVM was unable to recycle them, resulting in a continuous full GC. I would like to know why. thanks

Environment

Additional context

This is the image analyzed by jprofiler

jprofiler

mp911de commented 3 months ago

If you have a heap dump handy, please investigate the GC roots of the held object. It can well be that some of these objects are held by retry instances or other ones that are attached to objects that aren't cleared.