Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.7.01] Cursor errors on large queries #9944

Closed
schlaegerz opened this issue Jun 5, 2018 · 31 comments
Closed

[1.7.01] Cursor errors on large queries #9944

schlaegerz opened this issue Jun 5, 2018 · 31 comments

Comments

@schlaegerz
Copy link

schlaegerz commented Jun 5, 2018

I just migrated my website to 1.7.0.1 and I am getting a lot of crashes and failures only one production. It never reproed on my test endpoint or locally


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.<anonymous> (/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 have a bunch of different ones of these popping up, I seem to be able to fix most of them if I set a limit on them or lower the scope

None of these happened on any earlier versions so I think it has to do with upgrading to the new mongo

Before I fixed some of easier to fix iterations of this bug I could see a pretty big memory leak that was going to crash my server every few hours:

screen shot 2018-06-06 at 1 21 55 pm

I am now at a point where it is crashing only on queries I cannot really remove, some of which are built into the collection FS package, and one where I am displaying an "infinite" scroll list of items on my homepage, and as soon as it gets too big it seems to hit this crash occasionally.

@lynchem
Copy link

lynchem commented Jun 15, 2018

I also just got this when running a migration on staging which does a find({}).forEach on ~2500 docs, and updates them inside it.
We're also running 1.7.0.1
The same migration works fine locally.

MongoError: cursor id 23381356539481 not found
at /app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:598:61
at authenticateStragglers (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:516:16)
at Connection.messageHandler (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:552:5)
at emitMessageHandler (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/connection.js:309:10)
at TLSSocket.<anonymous> (/app/bundle/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 TLSSocket.emit (events.js:211:7)
at addChunk (_stream_readable.js:263:12)
at readableAddChunk (_stream_readable.js:250:11)
at TLSSocket.Readable.push (_stream_readable.js:208:10)
at TLSWrap.onread (net.js:597:20)
=> awaited here:
at Function.Promise.await (/app/bundle/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/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40
=> awaited here:
at Promise.await (/app/bundle/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 Cursor.(anonymous function) (packages/mongo/mongo_driver.js:879:44)
at Cursor.cursorProto.(anonymous function) (packages/montiapm_agent.js:3356:32)
at Cursor.kadira_Cursor_forEach [as forEach] (packages/montiapm_agent.js:3736:34)
at Object.up (server/migrations.js:2880:36)
at migrate (packages/percolate:migrations/migrations_server.js:217:5)
at Object.Migrations._migrateTo (packages/percolate:migrations/migrations_server.js:240:7)
at Object.Migrations.migrateTo (packages/percolate:migrations/migrations_server.js:142:10)
at server/startup/initDB.js:18:16
at Function.time (/app/bundle/programs/server/profile.js:309:28)
at /app/bundle/programs/server/boot.js:427:13
at /app/bundle/programs/server/boot.js:472:5
at Function.run (/app/bundle/programs/server/profile.js:510:12)
at /app/bundle/programs/server/boot.js:470:11

@lynchem
Copy link

lynchem commented Jun 15, 2018

A little more searching makes me think this is just the cursor timeout settings in the mongo server. Our timeout happened after 5 mins exactly. We have switched to Atlas for this project and also 3.6 so maybe the default cursor timeout has changed to 5 mins. Will try and find out.

@schlaegerz
Copy link
Author

Yeah it is definitely a cursor timeout as mine also happens every 5 minutes. Is there some meteor value that changed to 5 minutes to make these start to repro? Or was it just a mongo change that makes it faile in an unexpected way?

My query is trying to retrieve about 6MB of data and doesn't timeout every time, but once it starts timing out it seems to timeout a lot more often.

I would be fine with this behavior if it just logged an error and retried since these are not essential queries for my app, the main problem here is that it doesn't seem to handle it gracefully and leaks what appears to be the entire set of data it was querying.

@lynchem
Copy link

lynchem commented Jun 18, 2018

I don't think anything in Meteor changed, more the mongo server and driver. If we want to hang on to cursors for longer than 5 minutes now you need to pass a cursor flag noCursorTimeout: true . I'm not sure exactly how we do this from Meteor, I'm guessing the rawCollection is needed and then you can do
collection.find().addCursorFlag('noCursorTimeout',true)
but I haven't tried it.

@schlaegerz
Copy link
Author

Well I normally have cursors open for a lot longer than 5 minutes, and those are not really the ones that are the problem. The ones that are causing problems are the ones that are pulling in too much information.

@alienw8
Copy link

alienw8 commented Jul 3, 2018

Hi guys! I ran into a similar problem.
An error can occur even at the stage of project assembly, the code of the code is not even started yet.

2018-06-29T00:22:41.084+0000 I COMMAND [conn58] command zzp.users command: find { find: "users", filter: {}, sort: { createdAt: -1 }, limit: 1, returnKey: false, showRecordId: false, lsid: { id: UUID("d4e2768d-e5d1-489e-a516-fe241e9bae68") }, $db: "zzp" } planSummary: COLLSCAN keysExamined:0 docsExamined:50511 hasSortStage:1 cursorExhausted:1 numYields:395 nreturned:1 reslen:905 locks:{ Global: { acquireCount: { r: 792 } }, Database: { acquireCount: { r: 396 } }, Collection: { acquireCount: { r: 396 } } } protocol:op_query 146ms

more calls that query in background. There are a lot of similar queries on the database's database in idle applications

Exception while polling query {"collectionName":"users","selector":{},"options":{"transform":null}} { MongoError: cursor id 342334298148 not found
at /home/alien/.meteor/packages/npm-mongo/.3.0.7.1pwujhs.aiir++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/mongodb-core/lib/connection/pool.js:598:61
at authenticateStragglers (/home/alien/.meteor/packages/npm-mongo/.3.0.7.1pwujhs.aiir++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/mongodb-core/lib/connection/pool.js:516:16)
at Connection.messageHandler (/home/alien/.meteor/packages/npm-mongo/.3.0.7.1pwujhs.aiir++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/mongodb-core/lib/connection/pool.js:552:5)
at emitMessageHandler (/home/alien/.meteor/packages/npm-mongo/.3.0.7.1pwujhs.aiir++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/mongodb-core/lib/connection/connection.js:309:10)
at Socket. (/home/alien/.meteor/packages/npm-mongo/.3.0.7.1pwujhs.aiir++os+web.browser+web.browser.legacy+web.cordova/npm/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 (/home/alien/.meteor/packages/promise/.0.11.1.dwb7fs.ir2fk++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/meteor-promise/promise_server.js:56:12)
at Promise.asyncApply (packages/mongo/mongo_driver.js:1034:11)
at /home/alien/.meteor/packages/promise/.0.11.1.dwb7fs.ir2fk++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/meteor-promise/fiber_pool.js:43:40
=> awaited here:
at Promise.await (/home/alien/.meteor/packages/promise/.0.11.1.dwb7fs.ir2fk++os+web.browser+web.browser.legacy+web.cordova/npm/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 342334298148 not found',
ok: 0,
errmsg: 'cursor id 342334298148 not found',
code: 43,
codeName: 'CursorNotFound' }

@harleyholt
Copy link

Running Meteor 1.7 and Mongo 3.6.2. All of the problems we're seeing happening in our Meteor job collection jobs, but no reason to believe that it is limited to that--that just happens to be where a lot of data processing happens.

Experiencing a lot of cursor not found errors. The Mongo logs show the following:
Session S is used to do some operation.
endSession command called on S
Session S is used to do some operation.
endSession command called on S
Session S is used for a find, the cursor C is created and 101 documents returned
getMore called on cursor C, 1000 records returned
Repeated a few times
Session S is removed
Cursor C is killed
getMore called on cursor C which no longer exists, cursor is not found.

I've included the actual output below.

It looks like the process that cleans up the cursor happens every 5 minutes.

Setting the feature compatibility of Mongo down to 3.4 from 3.6 (db.adminCommand( { setFeatureCompatibilityVersion: "3.4" } )) results in cursors not being killed in my tests.

I'm testing this and reproducing by running a find on a collection of greater than 20000 records with a constant sleep in in the forEach loop. For example:

collection.find({}).forEach(function() { Meteor._sleepForMs(50); });

failed.txt

@koszta
Copy link
Contributor

koszta commented Jul 6, 2018

It might be related to https://jira.mongodb.org/browse/SERVER-34810

@harleyholt
Copy link

I have created a small meteor application which demonstrates the issue by just running meteor

https://github.com/harleyholt/meteor-issue-9944-reproduction

@artpolikarpov
Copy link

artpolikarpov commented Jul 23, 2018

+1, same problem!

We tried to use rawCollection and noCursorTimeout flag:

const cursor = Hosts.rawCollection().find({}, {timeout: false});
cursor.addCursorFlag('noCursorTimeout',true);
while (Promise.await(cursor.hasNext())) {
    const host = Promise.await(cursor.next());
    processHost(host);
}
cursor.close();

...but no luck :( We get the same error.

This is urgent and affect our production apps. Please share any ideas to fix or workaround this.

@artpolikarpov
Copy link

I can confirm that occasionally this happens not only in big jobs but also on regular collection.find().fetch() requests with a small number of returning documents (50-150).

@lynchem
Copy link

lynchem commented Jul 23, 2018

@artpolikarpov When you do this simple find().fetch() of a small number of docs, does the operation take > 5 mins ? That seems to be the hard limit.

We've redesigned our long running uses of cursors to avoid it and haven't seen it appear again since.

@artpolikarpov
Copy link

@lynchem, no.

@artpolikarpov
Copy link

artpolikarpov commented Jul 23, 2018

Downgrade to 1.6.1.3 temporarily solved the problem :/

The most terrible thing is that this error can crash the server:

screen shot 2018-07-23 at 17 14 55

screen shot 2018-07-23 at 17 15 34

@hwillson
Copy link
Contributor

First off, thanks for the excellent reproduction @harleyholt! As @koszta mentioned in
#9944 (comment), this appears to be a Mongo bug that has since been fixed in Mongo 3.6.6, 4.0.1 and 4.1.1. To confirm this I've run the reproduction using the pending Mongo 4 PR (#10058), and everything is working properly. Meteor 1.7.1 will be out soon, and should include the Mongo 4 PR, but in the meantime we might consider a patch release with Mongo 3.6.6 (Meteor 1.7.0.3 currently uses Mongo 3.6.4). More details shortly.

@artpolikarpov
Copy link

artpolikarpov commented Jul 24, 2018 via email

@hwillson
Copy link
Contributor

@artpolikarpov Good to know. The reproduction from #9944 (comment) works every time with Mongo 4. Any chance you can update to Mongo 4? We'll run more tests with 3.6.6.

@KoenLav
Copy link
Contributor

KoenLav commented Jul 29, 2018

@hwillson while this issue is definitely caused by a change in MongoDB I think my PR on batching oplog messages (when they are received in rapid follow up) could also help alleviate these kinds of issues.

It's quite simply not a good idea to be (live) subscribed to a collection when thousands of updates occur within a second.

Leaving this here in the hope you guys will see the merit in those changes, as there have been no comments/reviews as of yet...

(I understand these are difficult issues with a lot of architectural considerations, but some feedback would be greatly appreciated.)

@a4xrbj1
Copy link

a4xrbj1 commented Aug 5, 2018

I've opened #10107 and when we switched to Meteor 1.7.1-beta.22 the errors immediately stopped. No problems since then, our Atlas runs 3.6.6 but the only change we did in production was moving to 1.7.0.3

@etyp
Copy link

etyp commented Sep 10, 2018

Thanks everybody for the work tracking this down/solving.

@hwillson is there any reason this can't be released as a patch?

The issue seems pretty rough and we're still working through some side-effects from upgrading to Meteor 1.7.0.3. I'm worried that updating again to 1.7.1 will only increase side-effects from updates.

@SimonSimCity
Copy link
Contributor

I'm facing exactly the same error as described here. Every 5th minute some of my cursors, who happen to be still open, are crashing with the described message, and it is also reproducible for me using the package provided by @harleyholt.

@hwillson I'm using a mongodb decoupled from Meteor. I've tested this with both MongoDB v3.6.7 as well as v4.0.2 on Meteor 1.7.0.3, without fixing the problem. As I've updated to 1.7.1-rc.11, it was working. Since I wanted to nail it down, I tried it out and now I can confirm, that this got fixed somewhere between 1.7.1-beta.21 and 1.7.1-beta.22. I'd guess this changeset to fix it: 8e3f3d8

But sadly I can't prove it easily because updating the package npm-mongo on itself by calling meteor add [email protected] isn't possible 😞

@etyp
Copy link

etyp commented Sep 12, 2018

@artpolikarpov our production version is also 3.6.7 and we're seeing it. Did you ever figure out how to resolve?

@SimonSimCity
Copy link
Contributor

SimonSimCity commented Sep 12, 2018

I now digged even deeper:

To me it does not look to be a problem with the version of your MongoDB server, but of the MongoDB driver, which is bundled in Meteor.

I created a local copy of the package npm-mongo and started playing around and I can confirm that this bug is solved after switching from v3.0.11 to v3.1.0. I didn't go deeper from there, because the mongodb package 3.1.0 also works against all other versions of MongoDB: https://docs.mongodb.com/ecosystem/drivers/driver-compatibility-reference/#node-js-driver-compatibility

If you are like me and can't wait for version 1.7.1 or don't want to work with a beta or release-candidate, I advise you to do the same as I:

  1. Create a folder packages in your project
  2. Copy the package npm-mongo in the version used in your meteor version (e.g. from https://github.com/meteor/meteor/tree/release-1.7.0.3/packages/npm-mongo) into this folder
  3. Change the version in package.js inside the call Package.describe to 3.0.99 and the one inside the call Npm.depends to 3.1.1

I usually use the 99 to show that it's a customized version.

@hwillson If you need a prove, try this with the repository provided earlier. I could see it working.

@a4xrbj1
Copy link

a4xrbj1 commented Sep 12, 2018 via email

@artpolikarpov
Copy link

@etyp we rolled back to 1.6.1.3

@pedrolucasoliva
Copy link

I rolled back to 1.6.1.3 too.

@wlodi83
Copy link

wlodi83 commented Oct 24, 2018

I rolled back from Meteor 1.7.0.5 to 1.6.1.4 and npm-mongo downgraded from 3.0.11 to 2.2.34.

@schlaegerz
Copy link
Author

On 1.8 this error has stopped happening. I am still getting a memory leak from somewhere, but I'm not sure if it is related to this as i am not getting any logs any more, and the memery leak is a lot less severe.

@etyp
Copy link

etyp commented Oct 26, 2018

Oh yeah, this is definitely resolved in 1.8 with the new mongo driver.

@ricaragao
Copy link

ricaragao commented Jan 24, 2019

@alienw8 ,

Late, but you showed a query with filters without index. Because this your query is slow too. I saw this in your result: planSummary: COLLSCAN .

You can check https://docs.mongodb.com/manual/indexes/

Hi guys! I ran into a similar problem.
An error can occur even at the stage of project assembly, the code of the code is not even started yet.

2018-06-29T00:22:41.084+0000 I COMMAND [conn58] command zzp.users command: find { find: "users", filter: {}, sort: { createdAt: -1 }, limit: 1, returnKey: false, showRecordId: false, lsid: { id: UUID("d4e2768d-e5d1-489e-a516-fe241e9bae68") }, $db: "zzp" } planSummary: COLLSCAN keysExamined:0 docsExamined:50511 hasSortStage:1 cursorExhausted:1 numYields:395 nreturned:1 reslen:905 locks:{ Global: { acquireCount: { r: 792 } }, Database: { acquireCount: { r: 396 } }, Collection: { acquireCount: { r: 396 } } } protocol:op_query 146ms

more calls that query in background. There are a lot of similar queries on the database's database in idle applications

Exception while polling query {"collectionName":"users","selector":{},"options":{"transform":null}} { MongoError: cursor id 342334298148 not found
at /home/alien/.meteor/packages/npm-mongo/.3.0.7.1pwujhs.aiir++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/mongodb-core/lib/connection/pool.js:598:61
at authenticateStragglers (/home/alien/.meteor/packages/npm-mongo/.3.0.7.1pwujhs.aiir++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/mongodb-core/lib/connection/pool.js:516:16)
at Connection.messageHandler (/home/alien/.meteor/packages/npm-mongo/.3.0.7.1pwujhs.aiir++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/mongodb-core/lib/connection/pool.js:552:5)
at emitMessageHandler (/home/alien/.meteor/packages/npm-mongo/.3.0.7.1pwujhs.aiir++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/mongodb-core/lib/connection/connection.js:309:10)
at Socket. (/home/alien/.meteor/packages/npm-mongo/.3.0.7.1pwujhs.aiir++os+web.browser+web.browser.legacy+web.cordova/npm/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 (/home/alien/.meteor/packages/promise/.0.11.1.dwb7fs.ir2fk++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/meteor-promise/promise_server.js:56:12)
at Promise.asyncApply (packages/mongo/mongo_driver.js:1034:11)
at /home/alien/.meteor/packages/promise/.0.11.1.dwb7fs.ir2fk++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/meteor-promise/fiber_pool.js:43:40
=> awaited here:
at Promise.await (/home/alien/.meteor/packages/promise/.0.11.1.dwb7fs.ir2fk++os+web.browser+web.browser.legacy+web.cordova/npm/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 342334298148 not found',
ok: 0,
errmsg: 'cursor id 342334298148 not found',
code: 43,
codeName: 'CursorNotFound' }

@kakadais
Copy link

The answers showed this was solved but I got the same error on large data manipulating.

I got over 10,000 data and .find().forEach() performed with 2 second for each data,
and the error occurred around 1000th data.

So the process took a long time could happen this in a new version?
Meteor: 1.10.2
[email protected]

I20210525-17:43:36.039(9)? Exception while invoking method 'refineManual' MongoError: cursor id 5188271727632627675 not found
I20210525-17:43:36.039(9)?     at Connection.<anonymous> (/home/zmap/.meteor/packages/npm-mongo/.3.7.1.jsiia0.usyd++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/mongodb/lib/core/connection/pool.js:450:61)
I20210525-17:43:36.039(9)?     at Connection.emit (events.js:311:20)
I20210525-17:43:36.049(9)?     at Connection.EventEmitter.emit (domain.js:482:12)
I20210525-17:43:36.049(9)?     at processMessage (/home/zmap/.meteor/packages/npm-mongo/.3.7.1.jsiia0.usyd++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/mongodb/lib/core/connection/connection.js:384:10)
I20210525-17:43:36.049(9)?     at Socket.<anonymous> (/home/zmap/.meteor/packages/npm-mongo/.3.7.1.jsiia0.usyd++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/mongodb/lib/core/connection/connection.js:553:15)
I20210525-17:43:36.049(9)?     at Socket.emit (events.js:311:20)
I20210525-17:43:36.049(9)?     at Socket.EventEmitter.emit (domain.js:482:12)
I20210525-17:43:36.049(9)?     at addChunk (_stream_readable.js:294:12)
I20210525-17:43:36.049(9)?     at readableAddChunk (_stream_readable.js:275:11)
I20210525-17:43:36.049(9)?     at Socket.Readable.push (_stream_readable.js:209:10)
I20210525-17:43:36.049(9)?     at TCP.onStreamRead (internal/stream_base_commons.js:186:23)
I20210525-17:43:36.049(9)?  => awaited here:
I20210525-17:43:36.050(9)?     at Function.Promise.await (/home/zmap/.meteor/packages/promise/.0.11.2.iatt1i.xuutn++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/meteor-promise/promise_server.js:56:12)
I20210525-17:43:36.050(9)?     at packages/mongo/mongo_driver.js:1073:14
I20210525-17:43:36.050(9)?     at /home/zmap/.meteor/packages/promise/.0.11.2.iatt1i.xuutn++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/meteor-promise/fiber_pool.js:43:40
I20210525-17:43:36.050(9)?  => awaited here:
I20210525-17:43:36.050(9)?     at Promise.await (/home/zmap/.meteor/packages/promise/.0.11.2.iatt1i.xuutn++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/meteor-promise/promise_server.js:60:12)
I20210525-17:43:36.050(9)?     at SynchronousCursor._nextObject (packages/mongo/mongo_driver.js:1122:38)
I20210525-17:43:36.050(9)?     at SynchronousCursor.forEach (packages/mongo/mongo_driver.js:1136:22)
I20210525-17:43:36.050(9)?     at Cursor.<computed> [as forEach] (packages/mongo/mongo_driver.js:918:44)
I20210525-17:43:36.050(9)?     at MethodInvocation.refineManual (server/methods/zmapMethods.coffee:1216:28)
I20210525-17:43:36.050(9)?     at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1771:12)
I20210525-17:43:36.050(9)?     at packages/ddp-server/livedata_server.js:719:19
I20210525-17:43:36.051(9)?     at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)
I20210525-17:43:36.051(9)?     at packages/ddp-server/livedata_server.js:717:46
I20210525-17:43:36.051(9)?     at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)
I20210525-17:43:36.051(9)?     at packages/ddp-server/livedata_server.js:715:46
I20210525-17:43:36.051(9)?     at new Promise (<anonymous>)
I20210525-17:43:36.051(9)?     at Session.method (packages/ddp-server/livedata_server.js:689:23)
I20210525-17:43:36.051(9)?     at packages/ddp-server/livedata_server.js:559:43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests