Memory Leak when I try to create client
See original GitHub issueExpected behavior
It should’t have memory leak.
Actual behavior
[main] ERROR io.netty.util.ResourceLeakDetector - LEAK: HashedWheelTimer.release() was not called before it's garbage-collected. See http://netty.io/wiki/reference-counted-objects.html for more information.
Recent access records:
Created at:
io.netty.util.HashedWheelTimer.<init>(HashedWheelTimer.java:272)
io.netty.util.HashedWheelTimer.<init>(HashedWheelTimer.java:216)
io.netty.util.HashedWheelTimer.<init>(HashedWheelTimer.java:195)
org.redisson.connection.MasterSlaveConnectionManager.initTimer(MasterSlaveConnectionManager.java:318)
org.redisson.connection.MasterSlaveConnectionManager.<init>(MasterSlaveConnectionManager.java:161)
org.redisson.connection.SingleConnectionManager.<init>(SingleConnectionManager.java:34)
org.redisson.config.ConfigSupport.createConnectionManager(ConfigSupport.java:192)
org.redisson.Redisson.<init>(Redisson.java:122)
org.redisson.Redisson.create(Redisson.java:159)
test.main(test.java:32)
Steps to reproduce or test case
Codec stringCodec = new StringCodec();
for (int i = 0; i < 10; i++) {
RedissonClient client;
Config config = new Config();
config.useSingleServer().setAddress(RedisConfig.Address);
config.useSingleServer().setPassword(RedisConfig.Password);
config.setCodec(stringCodec);
client = Redisson.create(config);
BatchOptions options = BatchOptions.defaults();
RBatch pipe = client.createBatch(options);
pipe.getBucket("test", stringCodec).getAsync();
BatchResult res = pipe.execute();
System.out.println(res.getResponses().get(0));
client.shutdown();
System.gc();
}
Redis version
4.0.10
Redisson version
3.7.5
Redisson configuration
Config config = new Config();
config.useSingleServer().setAddress(RedisConfig.Address);
config.useSingleServer().setPassword(RedisConfig.Password);
config.setCodec(stringCodec);
client = Redisson.create(config);
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Redisson memory leak When I try to create client
This looks like a bug in Redisson where it creates a lot of HashedWheelTimer without closing these. I would open a bug-report there....
Read more >Fixing memory leaks in web applications | Read the Tea Leaves
But it's extremely unlikely to leak memory on the client side, since the browser will clear the memory every time you navigate between...
Read more >Causes of Memory Leaks in JavaScript and How to Avoid Them
In this article, we will explore programming patterns that cause memory leaks in JavaScript and explain how to improve memory management.
Read more >4 Types of Memory Leaks in JavaScript and How to Get Rid Of ...
In this article we will explore common types of memory leaks in client-side JavaScript code. We will also learn how to use the...
Read more >Understanding Memory Leaks in Java - Baeldung
A Memory Leak is a situation where there are objects present in the heap that are no longer used, but the garbage collector...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Fixed! Thanks for report
3.8.0