{"action":"created","issue":{"url":"https://api.github.com/repos/shazow/urllib3/issues/718","labels_url":"https://api.github.com/repos/shazow/urllib3/issues/718/labels{/name}","comments_url":"https://api.github.com/repos/shazow/urllib3/issues/718/comments","events_url":"https://api.github.com/repos/shazow/urllib3/issues/718/events","html_url":"https://github.com/shazow/urllib3/issues/718","id":111575693,"number":718,"title":"After read timeout, connection broken for a second timeout period","user":{"login":"fasaxc","id":469264,"avatar_url":"https://avatars.githubusercontent.com/u/469264?v=3","gravatar_id":"","url":"https://api.github.com/users/fasaxc","html_url":"https://github.com/fasaxc","followers_url":"https://api.github.com/users/fasaxc/followers","following_url":"https://api.github.com/users/fasaxc/following{/other_user}","gists_url":"https://api.github.com/users/fasaxc/gists{/gist_id}","starred_url":"https://api.github.com/users/fasaxc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fasaxc/subscriptions","organizations_url":"https://api.github.com/users/fasaxc/orgs","repos_url":"https://api.github.com/users/fasaxc/repos","events_url":"https://api.github.com/users/fasaxc/events{/privacy}","received_events_url":"https://api.github.com/users/fasaxc/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-10-15T09:15:36Z","updated_at":"2015-10-20T11:52:20Z","closed_at":"2015-10-19T18:44:58Z","body":"Using urllib3 1.12 to access etcd with a HTTPConnectionPool.  I do a long-poll read in a retry loop:\r\n```\r\nhttp = HTTPConnectionPool(\"localhost\", 4001, maxsize=2)\r\nwhile True:\r\n    try:\r\n        resp = http.request(\"GET\", \"http://localhost:4001/v2/keys/calico/v1\",\r\n                            fields={\"recursive\": \"true\", \"wait\": \"true\",\r\n                                    \"waitIndex\": next_index},\r\n                            timeout=5)\r\n        resp_body = loads(resp.data)\r\n    except ReadTimeoutError:\r\n        _log.info(\"Watch read timed out, restarting watch at index %s\",\r\n                  next_index)\r\n        continue\r\n    else:\r\n        ...\r\n```\r\nI expect some reads to time out because there was no data available.  In that case, I expect to hit the ReadTimeoutError, loop again and retry.  If there's then data waiting, I should get it immediately.\r\n\r\nI do see the ReadTimeoutError after the first failure.  However, when my code retries, I see a 5s delay and then this log:\r\n```\r\n2015-10-15 09:38:16,311[DEBUG]273: Incremented Retry for (url='http://localhost:4001/v2/keys/calico/v1?waitIndex=7611342&recursive=true&wait=true'): Retry(total=2, connect=None, read=None, redirect=None)\r\n2015-10-15 09:38:16,311[WARNING]625: Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ReadTimeoutError(\"HTTPConnectionPool(host='localhost', port=4001): Read timed out.\",)': http://localhost:4001/v2/keys/calico/v1?waitIndex=7611342&recursive=true&wait=true\r\n```\r\nOnly then do I receive a response to my retry."},"comment":{"url":"https://api.github.com/repos/shazow/urllib3/issues/comments/149538456","html_url":"https://github.com/shazow/urllib3/issues/718#issuecomment-149538456","issue_url":"https://api.github.com/repos/shazow/urllib3/issues/718","id":149538456,"user":{"login":"Lukasa","id":1382556,"avatar_url":"https://avatars.githubusercontent.com/u/1382556?v=3","gravatar_id":"","url":"https://api.github.com/users/Lukasa","html_url":"https://github.com/Lukasa","followers_url":"https://api.github.com/users/Lukasa/followers","following_url":"https://api.github.com/users/Lukasa/following{/other_user}","gists_url":"https://api.github.com/users/Lukasa/gists{/gist_id}","starred_url":"https://api.github.com/users/Lukasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lukasa/subscriptions","organizations_url":"https://api.github.com/users/Lukasa/orgs","repos_url":"https://api.github.com/users/Lukasa/repos","events_url":"https://api.github.com/users/Lukasa/events{/privacy}","received_events_url":"https://api.github.com/users/Lukasa/received_events","type":"User","site_admin":false},"created_at":"2015-10-20T11:52:20Z","updated_at":"2015-10-20T11:52:20Z","body":"@fasaxc This was not your original issue, it was a related one I believe I saw when I was diving through the source."}}