Meteor-Community-Packages/Meteor-CollectionFS

Crash in meteor 1.7 on polling collection

schlaegerz opened this issue · 1 comments

xception while polling query {"collectionName":"cfs.UserModels.filerecord","selector":{},"options":{}} { MongoError: cursor id 196229525868 not found
at /app/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:598:61
at authenticateStragglers (/app/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:516:16)
at Connection.messageHandler (/app/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:552:5)
at emitMessageHandler (/app/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/connection.js:309:10)
at Socket. (/app/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/connection.js:452:17)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at addChunk (_stream_readable.js:263:12)
at readableAddChunk (_stream_readable.js:250:11)
at Socket.Readable.push (_stream_readable.js:208:10)
at TCP.onread (net.js:597:20)
=> awaited here:
at Function.Promise.await (/app/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:56:12)
at Promise.asyncApply (packages/mongo/mongo_driver.js:1034:11)
at /app/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40
=> awaited here:
at Promise.await (/app/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:60:12)
at SynchronousCursor._nextObject (packages/mongo/mongo_driver.js:1083:12)
at SynchronousCursor.forEach (packages/mongo/mongo_driver.js:1097:22)
at SynchronousCursor.getRawObjects (packages/mongo/mongo_driver.js:1146:12)
at PollingObserveDriver._pollMongo (packages/mongo/polling_observe_driver.js:153:44)
at Object.task (packages/mongo/polling_observe_driver.js:90:12)
at Meteor.SynchronousQueue.SQp.run (packages/meteor.js:872:16)
at packages/meteor.js:849:12
name: 'MongoError',
message: 'cursor id 196229525868 not found',
ok: 0,
errmsg: 'cursor id 196229525868 not found',
code: 43,
codeName: 'CursorNotFound',
operationTime: Timestamp { bsontype: 'Timestamp', low: 1, high
: 1528229580 },
'$clusterTime':
{ clusterTime: Timestamp { bsontype: 'Timestamp', low: 1, high
: 1528229580 },
signature: { hash: [Object], keyId: [Object] } } }

I upgraded to 1.7 and am having this crash happen with some of my bigger collections. It appears that in the code there is a cursor on all the items in a collection, this ends up hitting a timeout and crashing.

Is it really necesary to query the entire collection in this package? This is probably a meteor bug, but it should be possible to work around.

I was looking around at other forks of this, and saw this that might be a solution to fix this problem, but I don't have nearly enough knowledge of this package to know how to test it or if this would even work