{"action":"created","issue":{"url":"https://api.github.com/repos/nrk/predis/issues/263","labels_url":"https://api.github.com/repos/nrk/predis/issues/263/labels{/name}","comments_url":"https://api.github.com/repos/nrk/predis/issues/263/comments","events_url":"https://api.github.com/repos/nrk/predis/issues/263/events","html_url":"https://github.com/nrk/predis/issues/263","id":93702588,"number":263,"title":"Predis","user":{"login":"Emdis","id":12834963,"avatar_url":"https://avatars.githubusercontent.com/u/12834963?v=3","gravatar_id":"","url":"https://api.github.com/users/Emdis","html_url":"https://github.com/Emdis","followers_url":"https://api.github.com/users/Emdis/followers","following_url":"https://api.github.com/users/Emdis/following{/other_user}","gists_url":"https://api.github.com/users/Emdis/gists{/gist_id}","starred_url":"https://api.github.com/users/Emdis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Emdis/subscriptions","organizations_url":"https://api.github.com/users/Emdis/orgs","repos_url":"https://api.github.com/users/Emdis/repos","events_url":"https://api.github.com/users/Emdis/events{/privacy}","received_events_url":"https://api.github.com/users/Emdis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-08T05:46:22Z","updated_at":"2015-07-17T01:02:09Z","closed_at":null,"body":"Hi guys,\r\n\r\nWe're using Predis 1.0.1 in Cluster mode (3 masters, 3 slaves) to connect to our Production Redis Platform (Redis 3.0.1) and we are having a weird issue.\r\nWe're having random connection time out, we checked obvious things like memory and/or CPU and/or IO and/or Network overload but found nothing.\r\n\r\n(07/07/15 12:15:14PM) [12949] ultraErrorHandler(): Fatal PHP error: 2, message: stream_socket_client(): unable to connect to tcp://X.X.X.X:6379 (Connection timed out), file: /opt/php/vendor/predis/src/Connection/StreamConnection.php, line 82 [12949] Ultra\\Lib\\Util\\Redis::get(): Connection timed out [tcp://X.X.X.X:6379]\r\n\r\nWe're having those errors even with low traffic so we checked the Redis connection refused counts but it reads 0 so we assume that for whatever reason Predis is not even able to reach the cluster.\r\n\r\nWe tried several combination of timeout (0 then -1 then 600) with read_write_timeout=-1 but no luck.\r\nThis is what we see from a code perspective\r\nWe tried:\r\n[parameters:Predis\\Connection\\Parameters:private] => Array\r\n                                                                (\r\n                                                                    [scheme] => tcp\r\n                                                                    [host] => X.X.X.X\r\n                                                                    [port] => 6379\r\n                                                                    [path] => /\r\n                                                                    [password] => ****\r\n                                                                    [read_write_timeout] => -1\r\n                                                                    [timeout] => 5\r\n                                                                )\r\n\r\nbut also\r\n[parameters:Predis\\Connection\\Parameters:private] => Array\r\n                                                                (\r\n                                                                    [scheme] => tcp\r\n                                                                    [host] => X.X.X.X\r\n                                                                    [port] => 6379\r\n                                                                    [path] => /\r\n                                                                    [password] => ****\r\n                                                                    [read_write_timeout] => -1\r\n                                                                    [timeout] => 0\r\n                                                                )\r\n\r\nHere is how we initiate our connection string with Predis\r\n\r\n$parameters = array('tcp://X.X.X.X/?password=secret&read_write_timeout=-1&timeout=0', 'tcp://Y.Y.Y.Y/?password=secret&read_write_timeout=-1&timeout=0','tcp://Z.Z.Z.Z/?password=secret&read_write_timeout=-1&timeout=0');\r\n\r\n$options = array(\"cluster\", \"redis\");\r\n$redis = new Predis\\Client(\r\n        $parameters\r\n        , $options);\r\n\r\nCould you help us please?\r\n\r\nThanks a lot !!!!"},"comment":{"url":"https://api.github.com/repos/nrk/predis/issues/comments/122140475","html_url":"https://github.com/nrk/predis/issues/263#issuecomment-122140475","issue_url":"https://api.github.com/repos/nrk/predis/issues/263","id":122140475,"user":{"login":"Emdis","id":12834963,"avatar_url":"https://avatars.githubusercontent.com/u/12834963?v=3","gravatar_id":"","url":"https://api.github.com/users/Emdis","html_url":"https://github.com/Emdis","followers_url":"https://api.github.com/users/Emdis/followers","following_url":"https://api.github.com/users/Emdis/following{/other_user}","gists_url":"https://api.github.com/users/Emdis/gists{/gist_id}","starred_url":"https://api.github.com/users/Emdis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Emdis/subscriptions","organizations_url":"https://api.github.com/users/Emdis/orgs","repos_url":"https://api.github.com/users/Emdis/repos","events_url":"https://api.github.com/users/Emdis/events{/privacy}","received_events_url":"https://api.github.com/users/Emdis/received_events","type":"User","site_admin":false},"created_at":"2015-07-17T01:02:09Z","updated_at":"2015-07-17T01:02:09Z","body":"Thanks for the hint on Redis Cluster !! Appreciate it"}}