{"action":"created","issue":{"url":"https://api.github.com/repos/ptaoussanis/carmine/issues/127","labels_url":"https://api.github.com/repos/ptaoussanis/carmine/issues/127/labels{/name}","comments_url":"https://api.github.com/repos/ptaoussanis/carmine/issues/127/comments","events_url":"https://api.github.com/repos/ptaoussanis/carmine/issues/127/events","html_url":"https://github.com/ptaoussanis/carmine/issues/127","id":57557264,"number":127,"title":"Commons-pool can slowly lose connections over time","user":{"login":"cespare","id":318501,"avatar_url":"https://avatars.githubusercontent.com/u/318501?v=3","gravatar_id":"","url":"https://api.github.com/users/cespare","html_url":"https://github.com/cespare","followers_url":"https://api.github.com/users/cespare/followers","following_url":"https://api.github.com/users/cespare/following{/other_user}","gists_url":"https://api.github.com/users/cespare/gists{/gist_id}","starred_url":"https://api.github.com/users/cespare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cespare/subscriptions","organizations_url":"https://api.github.com/users/cespare/orgs","repos_url":"https://api.github.com/users/cespare/repos","events_url":"https://api.github.com/users/cespare/events{/privacy}","received_events_url":"https://api.github.com/users/cespare/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ptaoussanis/carmine/labels/blocked/waiting","name":"blocked/waiting","color":"006b75"},{"url":"https://api.github.com/repos/ptaoussanis/carmine/labels/bug","name":"bug","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-02-13T04:14:21Z","updated_at":"2015-02-28T14:13:15Z","closed_at":null,"body":"Hi @ptaoussanis,\r\n\r\nThis is not, strictly speaking, a bug in Carmine, but we thought you would like to know. We have a server with many Redis connections and we found that over time, fewer and fewer were available to Carmine until the applications deadlocks waiting on connections. (This may be the same as #112; our stack traces certainly look the same.)\r\n\r\nWe did a lot of digging, and found that commons-pool2's GenericKeyedObjectPool can lose connections due to a bug in the eviction code. Carmine enables the evictor by default (the \"jedis settings\"). If we disable it, then we sometimes are handed connections that have been timed out by our redis server.\r\n\r\nWe've filed a bug against commons-pool2:\r\n\r\nhttps://issues.apache.org/jira/browse/POOL-287\r\n\r\nAfter spending many hours debugging and sifting through commons-pool2 code, we were frankly astounded by its complexity and subtlety, and we do not wish to continue depending on it in our production code. On our end, we've replaced commons-pool2 by a much simpler object pool of our own design. (Thanks for making the connection pool pluggable.)"},"comment":{"url":"https://api.github.com/repos/ptaoussanis/carmine/issues/comments/76527616","html_url":"https://github.com/ptaoussanis/carmine/issues/127#issuecomment-76527616","issue_url":"https://api.github.com/repos/ptaoussanis/carmine/issues/127","id":76527616,"user":{"login":"ptaoussanis","id":160011,"avatar_url":"https://avatars.githubusercontent.com/u/160011?v=3","gravatar_id":"","url":"https://api.github.com/users/ptaoussanis","html_url":"https://github.com/ptaoussanis","followers_url":"https://api.github.com/users/ptaoussanis/followers","following_url":"https://api.github.com/users/ptaoussanis/following{/other_user}","gists_url":"https://api.github.com/users/ptaoussanis/gists{/gist_id}","starred_url":"https://api.github.com/users/ptaoussanis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptaoussanis/subscriptions","organizations_url":"https://api.github.com/users/ptaoussanis/orgs","repos_url":"https://api.github.com/users/ptaoussanis/repos","events_url":"https://api.github.com/users/ptaoussanis/events{/privacy}","received_events_url":"https://api.github.com/users/ptaoussanis/received_events","type":"User","site_admin":false},"created_at":"2015-02-28T14:13:15Z","updated_at":"2015-02-28T14:13:15Z","body":"@dparis Thanks for the update.\r\n\r\nAm ready to cut a new Carmine release as soon as commons-pool v2.4 is out."}}