I am trying to run an aggregation pipeline using node.js and mongodb native driver on a sharded mongodb cluster with 2 shards. The monogdb ver. is 2.6.1. The operation runs for about 50 minutes and throws the error 'errmsg" : "exception: getMore: cursor didn't exist on server, possible restart or timeout?"' On googling I came across this link . It looks like the issue is not resolved yet. BTW, the size of the collection is about 140 million documents.
Is there a fix/workaround for this issue?
My guess is you could try to lower the batch size to make the cursor more "active". I came across this error after our server was running for more than 2.5 months. Mongo started dropping cursors even before the timeout (I guess some sort of memory error), restart of mongo solved our problem.