I am using MongoDB 1.6.3, to store a big collection (300k+ records). I added a composite index.
db[\'collection_name
Having a cursor batch size that is too large will cause this error. Setting the batch size does not limit the amount of data you can process, it just limits how much data is brought back from the database. When you iterate through and hit the batch limit, the process will make another trip to the database.