google-code-export / morphia

Automatically exported from code.google.com/p/morphia
1 stars 0 forks source link

Cursor not found using query with large result set, 0.99.1-SNAPSHOT #444

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Exception in thread "main" com.mongodb.MongoException$CursorNotFound: cursor 0 
not found on server localhost/127.0.0.1:27018
        at com.mongodb.DBApiLayer$Result.init(DBApiLayer.java:373)
        at com.mongodb.DBApiLayer$Result._advance(DBApiLayer.java:433)
        at com.mongodb.DBApiLayer$Result.hasNext(DBApiLayer.java:400)
        at com.mongodb.DBCursor._hasNext(DBCursor.java:464)
        at com.mongodb.DBCursor.hasNext(DBCursor.java:484)
        at com.google.code.morphia.query.MorphiaIterator.hasNext(MorphiaIterator.java:40)

I have a collection with a lot of data. So i fetch them, but after some time it 
throws the error above, even if there are other documents in the collection.

I'm using version 0.99.1-SNAPSHOT .

Original issue reported on code.google.com by giovanni...@gmail.com on 18 Jan 2013 at 1:16

GoogleCodeExporter commented 9 years ago
Have you tried adding .disableCursorTimeout() to your query?

Original comment by joeym...@gmail.com on 20 Jan 2013 at 9:16

GoogleCodeExporter commented 9 years ago
It seems to be resolved adding .disableCursorTimeout() to my query.

Original comment by giovanni...@gmail.com on 22 Jan 2013 at 1:20