We have a part of our Java app that tails the op log using a cursor. We've noticed that we frequently get exceptions stating the cursor could not be found on the server:
com.mongodb.MongoException$CursorNotFound: cursor not found on server
Our mongo logs show entries like:
Fri Jul 27 04:10:43 [conn921191] getMore: cursorid not found local.oplog.rs 6753601463703890990Fri Jul 27 04:11:02 [conn921191] getMore: cursorid not found local.oplog.rs 7612769998655795512Fri Jul 27 04:11:18 [conn921191] getMore: cursorid not found local.oplog.rs 3982945265377179786
I've read this can be caused if there is a cursor timeout, however I believe the default is a 10 min timeout and this happens much more frequently than 10 mins after cursor creation. Any thoughts on what could be causing this?
Here's some version info.
MongoDB: 2.0.4
Java Driver: 2.6.5
Here are the options applied to our cursor.
cursor.addOption( Bytes.QUERYOPTION_TAILABLE ); cursor.addOption( Bytes.QUERYOPTION_AWAITDATA ); cursor.addOption( Bytes.QUERYOPTION_OPLOGREPLAY );