I am running a sharded MongoDB Cluster with a single shard and use change streams to listen to change evens in the database. I am getting the Following error a couple of times per day:
MongoError: Error on remote shard shard-01-01:27017 :: caused by :: Resume of change stream was not possible, as the resume point may no longer be in the oplog. at MessageStream.messageHandler (/home/node/app/node_modules/mongodb/lib/cmap/connection.js:266:20) at MessageStream.emit (events.js:314:20) at MessageStream.EventEmitter.emit (domain.js:486:12) at processIncomingData (/home/node/app/node_modules/mongodb/lib/cmap/message_stream.js:144:12) at MessageStream._write (/home/node/app/node_modules/mongodb/lib/cmap/message_stream.js:42:5) at writeOrBuffer (_stream_writable.js:352:12) at MessageStream.Writable.write (_stream_writable.js:303:10) at TLSSocket.ondata (_stream_readable.js:713:22) at TLSSocket.emit (events.js:314:20) at TLSSocket.EventEmitter.emit (domain.js:486:12) at addChunk (_stream_readable.js:303:12) at readableAddChunk (_stream_readable.js:279:9) at TLSSocket.Readable.push (_stream_readable.js:218:10) at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)
Not sure what it is caused by or how to prevent it. Does anybody encountered the problem before or has any pointers?
Thanks in advance