{"action":"created","issue":{"url":"https://api.github.com/repos/KarelCemus/play-redis/issues/188","repository_url":"https://api.github.com/repos/KarelCemus/play-redis","labels_url":"https://api.github.com/repos/KarelCemus/play-redis/issues/188/labels{/name}","comments_url":"https://api.github.com/repos/KarelCemus/play-redis/issues/188/comments","events_url":"https://api.github.com/repos/KarelCemus/play-redis/issues/188/events","html_url":"https://github.com/KarelCemus/play-redis/issues/188","id":368358480,"node_id":"MDU6SXNzdWUzNjgzNTg0ODA=","number":188,"title":"Connection flood / Too many threads","user":{"login":"djole103","id":7957030,"node_id":"MDQ6VXNlcjc5NTcwMzA=","avatar_url":"https://avatars2.githubusercontent.com/u/7957030?v=4","gravatar_id":"","url":"https://api.github.com/users/djole103","html_url":"https://github.com/djole103","followers_url":"https://api.github.com/users/djole103/followers","following_url":"https://api.github.com/users/djole103/following{/other_user}","gists_url":"https://api.github.com/users/djole103/gists{/gist_id}","starred_url":"https://api.github.com/users/djole103/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djole103/subscriptions","organizations_url":"https://api.github.com/users/djole103/orgs","repos_url":"https://api.github.com/users/djole103/repos","events_url":"https://api.github.com/users/djole103/events{/privacy}","received_events_url":"https://api.github.com/users/djole103/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-09T19:20:24Z","updated_at":"2018-10-09T21:50:35Z","closed_at":null,"author_association":"NONE","body":"\r\n### Reporting a bug?\r\n1. Version of play-redis - 2.0.2\r\n1. Version of Scala - 2.12\r\n1. Version of Play - 2.6.12\r\n\r\nAdded a `cacheApi` dependency into the build.sbt which pulled this project.\r\nWith ```implicit @Named(\"redis\") cache: CacheAsyncApi``` in the class definition any `cache.get(...)` will get the value but the connection is never closed/reused. \r\n\r\nAs the applications continue to run I get a flood of redis connections and ultimately ``` [application-akka.actor.default-dispatcher-2154] [akka://application/syst\r\nem/IO-TCP/selectors/$a/1] Accept error: could not accept new connection\r\njava.io.IOException: Too many open files```\r\n\r\nI see that my setup would lead to using https://github.com/etaty/rediscala and the `RedisClient` class, but I don't see anywhere those connections are managed. \r\n\r\nSuggestions? Help?\r\n\r\nThanks\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/KarelCemus/play-redis/issues/comments/428365264","html_url":"https://github.com/KarelCemus/play-redis/issues/188#issuecomment-428365264","issue_url":"https://api.github.com/repos/KarelCemus/play-redis/issues/188","id":428365264,"node_id":"MDEyOklzc3VlQ29tbWVudDQyODM2NTI2NA==","user":{"login":"KarelCemus","id":1996368,"node_id":"MDQ6VXNlcjE5OTYzNjg=","avatar_url":"https://avatars0.githubusercontent.com/u/1996368?v=4","gravatar_id":"","url":"https://api.github.com/users/KarelCemus","html_url":"https://github.com/KarelCemus","followers_url":"https://api.github.com/users/KarelCemus/followers","following_url":"https://api.github.com/users/KarelCemus/following{/other_user}","gists_url":"https://api.github.com/users/KarelCemus/gists{/gist_id}","starred_url":"https://api.github.com/users/KarelCemus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KarelCemus/subscriptions","organizations_url":"https://api.github.com/users/KarelCemus/orgs","repos_url":"https://api.github.com/users/KarelCemus/repos","events_url":"https://api.github.com/users/KarelCemus/events{/privacy}","received_events_url":"https://api.github.com/users/KarelCemus/received_events","type":"User","site_admin":false},"created_at":"2018-10-09T21:50:35Z","updated_at":"2018-10-09T21:50:35Z","author_association":"OWNER","body":"This looks more like an issue with rediscala, not play-redis. However, it is difficult to say, can you provide steps to reproduce your issue? You talk about some \"your setup\", what it means?\r\n\r\nPlay-redis uses `RedisClient` internally as a singleton so there should not be any issue, unless it is a bug directly in the `RedisClient` itself.\r\n\r\n> but I don't see anywhere those connections are managed.\r\n\r\n`RedisClient` uses [`RedisClientActor`](https://github.com/etaty/rediscala/blob/55573df26adbe20be54291ffc67414af028bf889/src/main/scala/redis/Redis.scala#L38) to manage the connection\r\n\r\nSince you have an issue with connections, you might take a look at [RedisClientActor](https://github.com/etaty/rediscala/blob/55573df26adbe20be54291ffc67414af028bf889/src/main/scala/redis/actors/RedisClientActor.scala#L22) or even [RedisWorkerIO](https://github.com/etaty/rediscala/blob/55573df26adbe20be54291ffc67414af028bf889/src/main/scala/redis/actors/RedisWorkerIO.scala#L15), which manages the connection\r\n\r\n\r\nI am not sure if this helps you but you must provide additional details to reproduce your issue, otherwise I am unable to help you.\r\n"}}
{"actor":{"display_login":"KarelCemus"}}