title: MongoDB NodeJS Native cursor closing prematurely
body: <p>I'm executing a process to each element of a ursor, my collection has around 6 million documents, the entire process would take up to 10 hours since I have to process a profile at a time and it's a somewhat complex process for each one.</p>
  
  <pre><code> var cursor = dbMain.collection("profiles").find({});
  
   var getNext = function(){
        cursor.nextObject(processOne);
   };
  
   var processOne = function(err, profile){
        if(err){
             console.error("Error loading profile", err);
             getNext();
        } else if(profile == null){
             // process is done, all profiles processed!!!
        } else {
             processProfile(profile)
                 .then(function(){
                      getNext();
                 })
                 .catch(function(errProfile){
                      console.error("Error processing profile", errProfile);
                      getNext();
                 });
        }
   };
  
   var processProfile = function(profile){
        // Complex profile processing and promise resolve when done
   };
  
   getNext();
  </code></pre>
  
  <p>PROBLEM: I get null (which would mean the cursor has been exhausted) when i'm around 300,000 profiles, so, only the first 300,000 or so get processed. ¿Anyone knows how to deal with it or the reason I'm getting null way before time?</p>