{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/mongoose/issues/3354","labels_url":"https://api.github.com/repos/Automattic/mongoose/issues/3354/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/mongoose/issues/3354/comments","events_url":"https://api.github.com/repos/Automattic/mongoose/issues/3354/events","html_url":"https://github.com/Automattic/mongoose/issues/3354","id":105370293,"number":3354,"title":"Unable to set cursor timeout on Mongoose Schema.find().stream()","user":{"login":"debanjanbasu","id":10209115,"avatar_url":"https://avatars.githubusercontent.com/u/10209115?v=3","gravatar_id":"","url":"https://api.github.com/users/debanjanbasu","html_url":"https://github.com/debanjanbasu","followers_url":"https://api.github.com/users/debanjanbasu/followers","following_url":"https://api.github.com/users/debanjanbasu/following{/other_user}","gists_url":"https://api.github.com/users/debanjanbasu/gists{/gist_id}","starred_url":"https://api.github.com/users/debanjanbasu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/debanjanbasu/subscriptions","organizations_url":"https://api.github.com/users/debanjanbasu/orgs","repos_url":"https://api.github.com/users/debanjanbasu/repos","events_url":"https://api.github.com/users/debanjanbasu/events{/privacy}","received_events_url":"https://api.github.com/users/debanjanbasu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/Automattic/mongoose/milestones/58","html_url":"https://github.com/Automattic/mongoose/milestones/4.1.7","labels_url":"https://api.github.com/repos/Automattic/mongoose/milestones/58/labels","id":1282469,"number":58,"title":"4.1.7","description":"","creator":{"login":"vkarpov15","id":1620265,"avatar_url":"https://avatars.githubusercontent.com/u/1620265?v=3","gravatar_id":"","url":"https://api.github.com/users/vkarpov15","html_url":"https://github.com/vkarpov15","followers_url":"https://api.github.com/users/vkarpov15/followers","following_url":"https://api.github.com/users/vkarpov15/following{/other_user}","gists_url":"https://api.github.com/users/vkarpov15/gists{/gist_id}","starred_url":"https://api.github.com/users/vkarpov15/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkarpov15/subscriptions","organizations_url":"https://api.github.com/users/vkarpov15/orgs","repos_url":"https://api.github.com/users/vkarpov15/repos","events_url":"https://api.github.com/users/vkarpov15/events{/privacy}","received_events_url":"https://api.github.com/users/vkarpov15/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":3,"state":"open","created_at":"2015-08-31T16:59:36Z","updated_at":"2015-09-10T18:07:37Z","due_on":"2015-09-14T04:00:00Z","closed_at":null},"comments":3,"created_at":"2015-09-08T12:30:34Z","updated_at":"2015-09-10T18:27:00Z","closed_at":null,"body":"```\r\n{ [MongoError: cursor killed or timed out] name: 'MongoError', message: 'cursor killed or timed out' }\r\n```\r\n\r\nI am using the following code to poll the google docs API. I am polling with around 6k requests so the stream needs to be open for more than 10 minutes (default). I've tried with all the suggested online methods in vain.\r\n\r\nHere is the code and please guide me on how to achieve this simple feat.\r\n\r\n```\r\n                // create a mongoose stream\r\n                let orderstream = Order.find().stream();\r\n                // start listening to events on the stream\r\n                orderstream.on('data', (doc) => {\r\n                    // check if data already exists\r\n\r\n                    // add some data\r\n                    addRow(orderstream, sheet1, doc, 0);\r\n\r\n                }).on('error', (err) => {\r\n                    console.log(err);\r\n                    // send success\r\n                    // res.json({\r\n                    //     'status': 'failure'\r\n                    // });\r\n                }).on('close', () => {\r\n                    // the stream is closed\r\n                });\r\n```\r\n\r\nDon't give me the option to use nodejs-native mongodb driver. It works... But I don't wanna include another additional module to achieve what might be possible to be done using mongoose."},"comment":{"url":"https://api.github.com/repos/Automattic/mongoose/issues/comments/139335777","html_url":"https://github.com/Automattic/mongoose/issues/3354#issuecomment-139335777","issue_url":"https://api.github.com/repos/Automattic/mongoose/issues/3354","id":139335777,"user":{"login":"vkarpov15","id":1620265,"avatar_url":"https://avatars.githubusercontent.com/u/1620265?v=3","gravatar_id":"","url":"https://api.github.com/users/vkarpov15","html_url":"https://github.com/vkarpov15","followers_url":"https://api.github.com/users/vkarpov15/followers","following_url":"https://api.github.com/users/vkarpov15/following{/other_user}","gists_url":"https://api.github.com/users/vkarpov15/gists{/gist_id}","starred_url":"https://api.github.com/users/vkarpov15/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkarpov15/subscriptions","organizations_url":"https://api.github.com/users/vkarpov15/orgs","repos_url":"https://api.github.com/users/vkarpov15/repos","events_url":"https://api.github.com/users/vkarpov15/events{/privacy}","received_events_url":"https://api.github.com/users/vkarpov15/received_events","type":"User","site_admin":false},"created_at":"2015-09-10T18:27:00Z","updated_at":"2015-09-10T18:27:00Z","body":"Are you using a tailable cursor? It seems odd that it would take 10 minutes to stream 6k docs..."}}