{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch-py/issues/741","repository_url":"https://api.github.com/repos/elastic/elasticsearch-py","labels_url":"https://api.github.com/repos/elastic/elasticsearch-py/issues/741/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch-py/issues/741/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch-py/issues/741/events","html_url":"https://github.com/elastic/elasticsearch-py/issues/741","id":303584831,"number":741,"title":"Request Timeout V Network Timeout","user":{"login":"ydawant","id":3058333,"avatar_url":"https://avatars3.githubusercontent.com/u/3058333?v=4","gravatar_id":"","url":"https://api.github.com/users/ydawant","html_url":"https://github.com/ydawant","followers_url":"https://api.github.com/users/ydawant/followers","following_url":"https://api.github.com/users/ydawant/following{/other_user}","gists_url":"https://api.github.com/users/ydawant/gists{/gist_id}","starred_url":"https://api.github.com/users/ydawant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ydawant/subscriptions","organizations_url":"https://api.github.com/users/ydawant/orgs","repos_url":"https://api.github.com/users/ydawant/repos","events_url":"https://api.github.com/users/ydawant/events{/privacy}","received_events_url":"https://api.github.com/users/ydawant/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-03-08T18:32:38Z","updated_at":"2018-03-12T15:18:40Z","closed_at":null,"author_association":"NONE","body":"I'm not sure if this is the best place to bring this up, but I'm having some issues being able to differentiate a network timeout from a request timeout.\r\n\r\nIs there a way to set the connection timeout separate from the request timeout?\r\n\r\nBasically I want to be able to set different thresholds for when a node is not responding at all (which would result in a `ConnectTimeout` to one in which the request is just taking too long to process `ReadTimeout`\r\n\r\n`ConnectTimeout: HTTPConnectionPool(host=<host>, port=9200): Max retries exceeded with url: /_bulk (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f44f2c8f510>, 'Connection to <node> timed out. (connect timeout=10)'))`\r\n\r\nv\r\n\r\n`ReadTimeout: HTTPConnectionPool(host=<host> port=9200): Read timed out. (read timeout=10)`\r\n\r\nI'd like to set connect_timeout = 1 and read_timeout = 20\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch-py/issues/comments/372346745","html_url":"https://github.com/elastic/elasticsearch-py/issues/741#issuecomment-372346745","issue_url":"https://api.github.com/repos/elastic/elasticsearch-py/issues/741","id":372346745,"user":{"login":"fxdgear","id":146550,"avatar_url":"https://avatars2.githubusercontent.com/u/146550?v=4","gravatar_id":"","url":"https://api.github.com/users/fxdgear","html_url":"https://github.com/fxdgear","followers_url":"https://api.github.com/users/fxdgear/followers","following_url":"https://api.github.com/users/fxdgear/following{/other_user}","gists_url":"https://api.github.com/users/fxdgear/gists{/gist_id}","starred_url":"https://api.github.com/users/fxdgear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fxdgear/subscriptions","organizations_url":"https://api.github.com/users/fxdgear/orgs","repos_url":"https://api.github.com/users/fxdgear/repos","events_url":"https://api.github.com/users/fxdgear/events{/privacy}","received_events_url":"https://api.github.com/users/fxdgear/received_events","type":"User","site_admin":false},"created_at":"2018-03-12T15:18:40Z","updated_at":"2018-03-12T15:18:40Z","author_association":"CONTRIBUTOR","body":"@ydawant I don't feel comfortable having users potentially raising incorrect errors due to setting different timeouts and getting some unexpected behaviors. I just see this raising more issues than it solves. So I'm sorry about that. But I do understand your requirement. Though, I do feel that it's solved using sniffing. \r\n\r\nwrt to your 2nd question: \r\n\r\n> wouldn't throw any sort of error or log if the nodes changed, would it?\r\n\r\nNot sure I follow here. If you've configured the `Elasticsearch` object to to sniff on the various requirements:\r\n\r\n1. sniff on start = Sniff when you instantiate.\r\n2. sniff on connection fail = sniff when you get any connection failures. So if there's a connection failure sniff the cluster state again for any nodes that have been added or removed from the cluster\r\n \r\n"}}
{"actor":{"display_login":"fxdgear"}}