{"action":"created","issue":{"url":"https://api.github.com/repos/mrniko/redisson/issues/345","labels_url":"https://api.github.com/repos/mrniko/redisson/issues/345/labels{/name}","comments_url":"https://api.github.com/repos/mrniko/redisson/issues/345/comments","events_url":"https://api.github.com/repos/mrniko/redisson/issues/345/events","html_url":"https://github.com/mrniko/redisson/issues/345","id":123788197,"number":345,"title":"Redisson cluster Read connections issue","user":{"login":"zhxjouc","id":6149224,"avatar_url":"https://avatars.githubusercontent.com/u/6149224?v=3","gravatar_id":"","url":"https://api.github.com/users/zhxjouc","html_url":"https://github.com/zhxjouc","followers_url":"https://api.github.com/users/zhxjouc/followers","following_url":"https://api.github.com/users/zhxjouc/following{/other_user}","gists_url":"https://api.github.com/users/zhxjouc/gists{/gist_id}","starred_url":"https://api.github.com/users/zhxjouc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhxjouc/subscriptions","organizations_url":"https://api.github.com/users/zhxjouc/orgs","repos_url":"https://api.github.com/users/zhxjouc/repos","events_url":"https://api.github.com/users/zhxjouc/events{/privacy}","received_events_url":"https://api.github.com/users/zhxjouc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":21,"created_at":"2015-12-24T10:38:14Z","updated_at":"2016-01-04T08:34:31Z","closed_at":null,"body":"I use Redisson 2.2 to implement distributed lock in my project and use Redis cluster.  And I found the Redisson client will create new connection and do not use the connection in the pool while invoke some readOnly methods which execute evalRead. So when I start to run the test it will produce lots of TIME_WAIT connection on my server. The followings are some logs on my server.\r\n``\r\n12/24/15 08:59:06:949: [SimpleProcessor-0]: DEBUG org.redisson.cluster.ClusterConnectionManager - slot 8978 for USER_WALLETS-test\r\n``\r\n``\r\n12/24/15 08:59:06:949: [nioEventLoopGroup-2-2]: DEBUG org.redisson.command.CommandSyncService - getting connection for command (EVAL) from slot NodeSource [slot=8978, addr=null, redirect=null] using node /192.168.1.51:2500\r\n``\r\n``\r\n12/24/15 08:59:06:950: [nioEventLoopGroup-2-6]: DEBUG org.redisson.connection.ClientConnectionsEntry - new connection created: RedisConnection [redisClient=RedisClient [addr=/168.168.1.54:2000], channel=[id: 0xc239f9bb, /192.168.1.11:43560 => /192.168.1.54:2000]]\r\n``\r\n``\r\n12/24/15 08:59:06:951: [nioEventLoopGroup-2-4]: DEBUG org.redisson.command.CommandSyncService - getting connection for command (EVAL) from slot NodeSource [slot=8978, addr=/192.168.1.54:2000, redirect=MOVED] using node /168.168.1.54:2000\r\n``\r\nThe codes are very spectacular and I only understand a bit. But I doubt whether the client get the connection from the pool but also create a new one?"},"comment":{"url":"https://api.github.com/repos/mrniko/redisson/issues/comments/168611143","html_url":"https://github.com/mrniko/redisson/issues/345#issuecomment-168611143","issue_url":"https://api.github.com/repos/mrniko/redisson/issues/345","id":168611143,"user":{"login":"mrniko","id":1104661,"avatar_url":"https://avatars.githubusercontent.com/u/1104661?v=3","gravatar_id":"","url":"https://api.github.com/users/mrniko","html_url":"https://github.com/mrniko","followers_url":"https://api.github.com/users/mrniko/followers","following_url":"https://api.github.com/users/mrniko/following{/other_user}","gists_url":"https://api.github.com/users/mrniko/gists{/gist_id}","starred_url":"https://api.github.com/users/mrniko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrniko/subscriptions","organizations_url":"https://api.github.com/users/mrniko/orgs","repos_url":"https://api.github.com/users/mrniko/repos","events_url":"https://api.github.com/users/mrniko/events{/privacy}","received_events_url":"https://api.github.com/users/mrniko/received_events","type":"User","site_admin":false},"created_at":"2016-01-04T08:34:31Z","updated_at":"2016-01-04T08:34:31Z","body":"i think cause of bug is in `setReadFromSlaves(false);` settings. I made some fixes for it. Could you please sync code from master branch and try it again?"}}