{"action":"created","issue":{"url":"https://api.github.com/repos/christkv/mongodb-core/issues/89","repository_url":"https://api.github.com/repos/christkv/mongodb-core","labels_url":"https://api.github.com/repos/christkv/mongodb-core/issues/89/labels{/name}","comments_url":"https://api.github.com/repos/christkv/mongodb-core/issues/89/comments","events_url":"https://api.github.com/repos/christkv/mongodb-core/issues/89/events","html_url":"https://github.com/christkv/mongodb-core/issues/89","id":144501832,"number":89,"title":"Cursor not found when poolSize > 1","user":{"login":"iamdoron","id":3956042,"avatar_url":"https://avatars.githubusercontent.com/u/3956042?v=3","gravatar_id":"","url":"https://api.github.com/users/iamdoron","html_url":"https://github.com/iamdoron","followers_url":"https://api.github.com/users/iamdoron/followers","following_url":"https://api.github.com/users/iamdoron/following{/other_user}","gists_url":"https://api.github.com/users/iamdoron/gists{/gist_id}","starred_url":"https://api.github.com/users/iamdoron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamdoron/subscriptions","organizations_url":"https://api.github.com/users/iamdoron/orgs","repos_url":"https://api.github.com/users/iamdoron/repos","events_url":"https://api.github.com/users/iamdoron/events{/privacy}","received_events_url":"https://api.github.com/users/iamdoron/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-03-30T08:24:53Z","updated_at":"2016-03-30T11:33:46Z","closed_at":null,"body":"I'm not sure if it's a driver issue. I'm connecting to mongos (2 servers) through ssl with the following configuration:\r\n\r\n```\r\nconst mongoOptions = {\r\n mongos: {\r\n    ssl: true,\r\n    sslValidate: true,\r\n    sslCA: ca,\r\n    poolSize: <poolSize>\r\n  },\r\n  acceptableLatencyMS: 100,\r\n  socketOptions: {\r\n    keepAlive: 120\r\n  }\r\n}\r\n```\r\n\r\nmongodb-driver version 2.1.12, mongodb-core 1.3.12\r\n\r\nI'm running multiple queries (using the driver find().toArray()); 4 return empty results, 2 return ~1k results out of ~30k in the whole collection, the ~1k query takes  ~400ms to complete.\r\n\r\nsometimes I get the following errors when poolSize > 1\r\n```\r\n{ [MongoError: Cursor not found (namespace: 'db.collection', id: 9047773609076924875).]\r\n  name: 'MongoError',\r\n  message: 'Cursor not found (namespace: \\'db.collection\\', id: 9047773609076924875).',\r\n  ok: 0,\r\n  errmsg: 'Cursor not found (namespace: \\'db.collection\\', id: 9047773609076924875).',\r\n  code: 43 }\r\n``` \r\n\r\nThe more you increase the poolSize, the higher the chance of it happening. And, of course, increasing the number of queries would also increase the error rate.\r\nwith poolSize=1 I wasn't able to reproduce this issue"},"comment":{"url":"https://api.github.com/repos/christkv/mongodb-core/issues/comments/203389486","html_url":"https://github.com/christkv/mongodb-core/issues/89#issuecomment-203389486","issue_url":"https://api.github.com/repos/christkv/mongodb-core/issues/89","id":203389486,"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-03-30T11:33:46Z","updated_at":"2016-03-30T11:33:46Z","body":"alright, just manually update the mongodb driver package to use mongodb-core 1.3.13 and let me know if the issue is resolved. if it works I'll release a mongodb version update. Thanks for helping chase down these issues caused by the pool refactoring."}}