{"action":"created","issue":{"url":"https://api.github.com/repos/dakrone/clj-http/issues/315","repository_url":"https://api.github.com/repos/dakrone/clj-http","labels_url":"https://api.github.com/repos/dakrone/clj-http/issues/315/labels{/name}","comments_url":"https://api.github.com/repos/dakrone/clj-http/issues/315/comments","events_url":"https://api.github.com/repos/dakrone/clj-http/issues/315/events","html_url":"https://github.com/dakrone/clj-http/issues/315","id":143066065,"number":315,"title":"Why are the default timeouts -1 forever?","user":{"login":"timothypratley","id":49298,"avatar_url":"https://avatars.githubusercontent.com/u/49298?v=3","gravatar_id":"","url":"https://api.github.com/users/timothypratley","html_url":"https://github.com/timothypratley","followers_url":"https://api.github.com/users/timothypratley/followers","following_url":"https://api.github.com/users/timothypratley/following{/other_user}","gists_url":"https://api.github.com/users/timothypratley/gists{/gist_id}","starred_url":"https://api.github.com/users/timothypratley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timothypratley/subscriptions","organizations_url":"https://api.github.com/users/timothypratley/orgs","repos_url":"https://api.github.com/users/timothypratley/repos","events_url":"https://api.github.com/users/timothypratley/events{/privacy}","received_events_url":"https://api.github.com/users/timothypratley/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-23T20:05:44Z","updated_at":"2016-03-23T21:21:09Z","closed_at":"2016-03-23T21:21:09Z","body":"Shouldn't the default timeouts to something reasonable like 10 seconds?\r\n"},"comment":{"url":"https://api.github.com/repos/dakrone/clj-http/issues/comments/200549255","html_url":"https://github.com/dakrone/clj-http/issues/315#issuecomment-200549255","issue_url":"https://api.github.com/repos/dakrone/clj-http/issues/315","id":200549255,"user":{"login":"timothypratley","id":49298,"avatar_url":"https://avatars.githubusercontent.com/u/49298?v=3","gravatar_id":"","url":"https://api.github.com/users/timothypratley","html_url":"https://github.com/timothypratley","followers_url":"https://api.github.com/users/timothypratley/followers","following_url":"https://api.github.com/users/timothypratley/following{/other_user}","gists_url":"https://api.github.com/users/timothypratley/gists{/gist_id}","starred_url":"https://api.github.com/users/timothypratley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timothypratley/subscriptions","organizations_url":"https://api.github.com/users/timothypratley/orgs","repos_url":"https://api.github.com/users/timothypratley/repos","events_url":"https://api.github.com/users/timothypratley/events{/privacy}","received_events_url":"https://api.github.com/users/timothypratley/received_events","type":"User","site_admin":false},"created_at":"2016-03-23T21:21:09Z","updated_at":"2016-03-23T21:21:09Z","body":"Hi Lee,\r\n\r\n\r\nIMO unbounded operations are a bit of a smell.\r\nJust like waiting for a lock indefinitely is likely to leave my system crippled,\r\nwaiting for a response indefinitely will do too.\r\nHere is a great talk on why locks should always have a timeout:\r\nhttps://www.youtube.com/watch?v=yhguOt863nw\r\nI don't have any links to anyone evaluating socket timeout merits in depth, but my opinion is that the same reasons hold true.\r\n\r\nMy desire for defaults comes from finding that when I omit them, I often spend a lot of time diagnosing something that would have been obvious with a timeout, and end up always having a timeout specified.\r\n\r\nHaving said all that, I do think it is a good policy to follow the Apache defaults. However from looking at the code it does seem like they are explicitly set to -1 (in HEAD). In any case, it would be a difficult change to justify given it could be potentially breaking for some people... So I can't realistically push for it.\r\n\r\nI'm interested in how best to approach this desire to have my connections be bounded... remembering to add the timeouts everywhere is a little wordy and prone to mistakes because for example in clojurescript the keyword is :timeout but in clojure it is :socket-timeout and :conn-timeout. And or if there are any good references on why unbounded is better.\r\n\r\n\r\nRegards,\r\nTimothy"}}