{"action":"created","issue":{"url":"https://api.github.com/repos/redisson/redisson/issues/1315","repository_url":"https://api.github.com/repos/redisson/redisson","labels_url":"https://api.github.com/repos/redisson/redisson/issues/1315/labels{/name}","comments_url":"https://api.github.com/repos/redisson/redisson/issues/1315/comments","events_url":"https://api.github.com/repos/redisson/redisson/issues/1315/events","html_url":"https://github.com/redisson/redisson/issues/1315","id":299449254,"number":1315,"title":"\"Unable to init enough connections\" when ConnectionMinimumIdleSize is high","user":{"login":"maltalex","id":10195391,"avatar_url":"https://avatars3.githubusercontent.com/u/10195391?v=4","gravatar_id":"","url":"https://api.github.com/users/maltalex","html_url":"https://github.com/maltalex","followers_url":"https://api.github.com/users/maltalex/followers","following_url":"https://api.github.com/users/maltalex/following{/other_user}","gists_url":"https://api.github.com/users/maltalex/gists{/gist_id}","starred_url":"https://api.github.com/users/maltalex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maltalex/subscriptions","organizations_url":"https://api.github.com/users/maltalex/orgs","repos_url":"https://api.github.com/users/maltalex/repos","events_url":"https://api.github.com/users/maltalex/events{/privacy}","received_events_url":"https://api.github.com/users/maltalex/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-02-22T17:54:33Z","updated_at":"2018-03-01T16:57:12Z","closed_at":null,"author_association":"NONE","body":"We're having trouble spinning up redisson (3.6.1) when the minimum number of connections is high.\r\n\r\nSteps to reproduce:\r\n\r\n1. Run a local redis server. We used the official docker image:\r\n\r\n`docker container run -d --name redis -p 6379:6379 redis`\r\n\r\n2. Try to create a redisson client with a high number of idle connections, short retry interval and some client name:\r\n\r\n```\r\npublic static void main(String[] args) {\r\n    Config config = new Config();\r\n    config.useSingleServer()\r\n            .setAddress(\"redis://127.0.0.1:6379\")\r\n            .setClientName(\"client\")\r\n            .setConnectionMinimumIdleSize(1000)\r\n            .setConnectionPoolSize(2000)\r\n            .setRetryInterval(100);\r\n    RedissonClient client = Redisson.create(config);\r\n    System.out.println(\"Done!\");\r\n}\r\n```\r\n\r\nMore often than not, we're getting the following exception after a few seconds, with a varying number if successful connections:\r\n\r\n```\r\nException in thread \"main\" org.redisson.client.RedisConnectionException: Unable to init enough connections amount! Only 440 from 1000 were initialized. Redis server: /127.0.0.1:6379\r\n\tat org.redisson.connection.pool.ConnectionPool$2$1.operationComplete(ConnectionPool.java:138)\r\n\tat io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:512)\r\n\tat io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:486)\r\n\tat io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:425)\r\n\tat io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:122)\r\n\tat org.redisson.misc.RedissonPromise.tryFailure(RedissonPromise.java:108)\r\n\tat org.redisson.connection.pool.ConnectionPool.promiseFailure(ConnectionPool.java:307)\r\n\tat org.redisson.connection.pool.ConnectionPool.access$400(ConnectionPool.java:54)\r\n\tat org.redisson.connection.pool.ConnectionPool$4.operationComplete(ConnectionPool.java:277)\r\n\tat io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:512)\r\n\tat io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:505)\r\n\tat io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:484)\r\n\tat io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:425)\r\n\tat io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:122)\r\n\tat org.redisson.misc.RedissonPromise.tryFailure(RedissonPromise.java:108)\r\n\tat org.redisson.client.RedisClient$2$1$1$1.run(RedisClient.java:215)\r\n\tat io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)\r\n\tat io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)\r\n\tat io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463)\r\n\tat io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886)\r\n\tat io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)\r\n\tat java.lang.Thread.run(Thread.java:748)\r\nCaused by: org.redisson.client.RedisTimeoutException: Command execution timeout for /127.0.0.1:6379\r\n\tat org.redisson.client.RedisConnection$2.run(RedisConnection.java:212)\r\n\tat io.netty.util.concurrent.PromiseTask$RunnableAdapter.call(PromiseTask.java:38)\r\n\tat io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:125)\r\n\t... 6 more\r\n```"},"comment":{"url":"https://api.github.com/repos/redisson/redisson/issues/comments/369657766","html_url":"https://github.com/redisson/redisson/issues/1315#issuecomment-369657766","issue_url":"https://api.github.com/repos/redisson/redisson/issues/1315","id":369657766,"user":{"login":"maltalex","id":10195391,"avatar_url":"https://avatars3.githubusercontent.com/u/10195391?v=4","gravatar_id":"","url":"https://api.github.com/users/maltalex","html_url":"https://github.com/maltalex","followers_url":"https://api.github.com/users/maltalex/followers","following_url":"https://api.github.com/users/maltalex/following{/other_user}","gists_url":"https://api.github.com/users/maltalex/gists{/gist_id}","starred_url":"https://api.github.com/users/maltalex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maltalex/subscriptions","organizations_url":"https://api.github.com/users/maltalex/orgs","repos_url":"https://api.github.com/users/maltalex/repos","events_url":"https://api.github.com/users/maltalex/events{/privacy}","received_events_url":"https://api.github.com/users/maltalex/received_events","type":"User","site_admin":false},"created_at":"2018-03-01T16:57:12Z","updated_at":"2018-03-01T16:57:12Z","author_association":"NONE","body":"Thanks. I'll try it out. \r\nBut just to be clear, I'd like to know though whether this behavior is considered normal for redisson, even if tweaking the configuration reduces the chance of it happening."}}
{"actor":{"display_login":"maltalex"}}