title: errmsg" : "exception: getMore: cursor didn't exist on server, possible restart or time out?"
body: <p>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 <a href="https://jira.mongodb.org/browse/SERVER-6036" rel="nofollow">link</a> . It looks like the issue is not resolved yet. BTW, the size of the collection is about 140 million documents.</p>
  
  <p>Is there a fix/workaround for this issue?</p>
  
  <p>Here is the pipeline that I am trying to run. I don't know at what stage it breaks. It runs for about 50 minutes and the error happens. Same is the case with any aggregation pipeline that I try to run.</p>
  
  <pre class="lang-js prettyprint-override"><code>db.collection01.aggregate([
    {$match:{"state_cd":"CA"}}, 
    {$group : {"_id": "$pat_id" , count : {$sum : 1}}} 
  ],
  {out: "distinct_patid_count", allowDiskUse: true }
  )
  </code></pre>