Skip to content

LEAK: ByteBuf.release() was not called before it's garbage-collected. #6857

@ryungqm

Description

@ryungqm

Redis version

2.7.2

Redisson version

3.50.0

Redisson configuration

connectTimeout: 120000
timeout: 10000
clientName:
slaveConnectionPoolSize: 24
slaveConnectionMinimumIdleSize: 10
masterConnectionPoolSize: 64
readMode: "SLAVE"
subscriptionMode: "SLAVE"
sentinelAddresses:
masterName: "mymaster"

What is the Expected behavior?

No response

What is the Actual behavior?

This error happens occasionally, in Java code we use @Cacheable to update / create the cache

2025-11-10 09:41:45.449 [redisson-netty-1-11] ERROR   io.netty.util.ResourceLeakDetector - LEAK: ByteBuf.release() was not called before it's garbage-collected. See https://netty.io/wiki/reference-counted-objects.html for more information.
Recent access records: 
Created at:
	io.netty.buffer.PooledByteBufAllocator.newDirectBuffer(PooledByteBufAllocator.java:410)
	io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:188)
	io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:174)
	io.netty.buffer.AbstractByteBufAllocator.buffer(AbstractByteBufAllocator.java:108)
	org.redisson.codec.Kryo5Codec$5.encode(Kryo5Codec.java:205)
	org.redisson.command.CommandAsyncService.encodeMapKey(CommandAsyncService.java:932)
	org.redisson.RedissonObject.encodeMapKey(RedissonObject.java:533)
	org.redisson.RedissonMapCache.fastPutOperationAsync(RedissonMapCache.java:1146)
	org.redisson.RedissonMapCache.fastPutAsync(RedissonMapCache.java:1032)
	org.redisson.RedissonMapCache.fastPut(RedissonMapCache.java:1006)
	org.redisson.spring.cache.RedissonCache.put(RedissonCache.java:131)
	org.springframework.cache.interceptor.AbstractCacheInvoker.doPut(AbstractCacheInvoker.java:87)
	org.springframework.cache.interceptor.CacheAspectSupport$CachePutRequest.apply(CacheAspectSupport.java:837)
	org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:429)
	org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:345)
	org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:64)

Additional information

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions