{"action":"created","issue":{"url":"https://api.github.com/repos/christkv/mongodb-core/issues/153","repository_url":"https://api.github.com/repos/christkv/mongodb-core","labels_url":"https://api.github.com/repos/christkv/mongodb-core/issues/153/labels{/name}","comments_url":"https://api.github.com/repos/christkv/mongodb-core/issues/153/comments","events_url":"https://api.github.com/repos/christkv/mongodb-core/issues/153/events","html_url":"https://github.com/christkv/mongodb-core/issues/153","id":191543787,"number":153,"title":"connectTimeoutMS, socketTimeoutMS not doing what they are supposed to","user":{"login":"jishi","id":3165475,"avatar_url":"https://avatars.githubusercontent.com/u/3165475?v=3","gravatar_id":"","url":"https://api.github.com/users/jishi","html_url":"https://github.com/jishi","followers_url":"https://api.github.com/users/jishi/followers","following_url":"https://api.github.com/users/jishi/following{/other_user}","gists_url":"https://api.github.com/users/jishi/gists{/gist_id}","starred_url":"https://api.github.com/users/jishi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jishi/subscriptions","organizations_url":"https://api.github.com/users/jishi/orgs","repos_url":"https://api.github.com/users/jishi/repos","events_url":"https://api.github.com/users/jishi/events{/privacy}","received_events_url":"https://api.github.com/users/jishi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":30,"created_at":"2016-11-24T15:15:17Z","updated_at":"2016-12-20T11:42:03Z","closed_at":null,"body":"I have a hard time grasping how these settings are supposed to be used. For example:\r\n\r\n`connectTimeoutMS` doesn't seem to make any difference. A connection timeout will occur after `socketTimeoutMS`, always for me, when dropping traffic aimed for a mongodb server.\r\n\r\nIn addition, `socketTimeoutMS` never trigger a timeout, if I have constant queries occupying the connections, since it seems to consider traffic in both direction. This seems completely broken to me. Consider the following scenario:\r\n\r\nConnect to mongo\r\nperiodically (every second or so) query or ping the database)\r\nstart dropping all traffic with `iptables -I OUTPUT -p tcp --dport 27017 -j DROP` or similar\r\n\r\nno timeout event is ever fired, so it never triggers a reconnect and will halt indefinitely. `bufferMaxEntries` in this case has no effect, since it isn't even aware that no connections are available. Same goes for `maxTimeMS`, since the query never reaches the server, query never times out. \r\n\r\nI have been dealing with this previously and ended up building my own timers around both connect and constant pinging to identify dead endpoints, but since there is no way of manually trigger a teardown/reconnect of topology without scrapping the Db-instance completely, it's impossible to follow the same API flow as the driver. \r\n\r\nAm I missing something obvious? This was tested using 2.2.11. "},"comment":{"url":"https://api.github.com/repos/christkv/mongodb-core/issues/comments/268222903","html_url":"https://github.com/christkv/mongodb-core/issues/153#issuecomment-268222903","issue_url":"https://api.github.com/repos/christkv/mongodb-core/issues/153","id":268222903,"user":{"login":"christkv","id":5569,"avatar_url":"https://avatars.githubusercontent.com/u/5569?v=3","gravatar_id":"","url":"https://api.github.com/users/christkv","html_url":"https://github.com/christkv","followers_url":"https://api.github.com/users/christkv/followers","following_url":"https://api.github.com/users/christkv/following{/other_user}","gists_url":"https://api.github.com/users/christkv/gists{/gist_id}","starred_url":"https://api.github.com/users/christkv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christkv/subscriptions","organizations_url":"https://api.github.com/users/christkv/orgs","repos_url":"https://api.github.com/users/christkv/repos","events_url":"https://api.github.com/users/christkv/events{/privacy}","received_events_url":"https://api.github.com/users/christkv/received_events","type":"User","site_admin":false},"created_at":"2016-12-20T11:42:03Z","updated_at":"2016-12-20T11:42:03Z","body":"@pnutshellmenace do you mind testing out the latest 2.2 branch commit, I've refactored it to do monitoring in parallel instead of serially which should improve things even more."}}
{"actor":{"display_login":"christkv"}}