I am getting the following error in Mongoose:
"MongoServerError: Cannot run getMore on cursor 6224168430091520949, which was created in session 2ff2f1d8-537e-4dcf-994a-a1ab7a50c337 - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=, without an lsid\n
at MessageStream.messageHandler (/home/node/node_modules/mongoose/node_modules/mongodb/lib/cmap/connection.js:467:30)\n at MessageStream.emit (events.js:400:28)\n
at processIncomingData (/home/node/node_modules/mongoose/node_modules/mongodb/lib/cmap/message_stream.js:108:16)\n
at MessageStream._write (/home/node/node_modules/mongoose/node_modules/mongodb/lib/cmap/message_stream.js:28:9)\n
at writeOrBuffer (internal/streams/writable.js:358:12)\n
at MessageStream.Writable.write (internal/streams/writable.js:303:10)\n
at Socket.ondata (internal/streams/readable.js:731:22)\n
at Socket.emit (events.js:400:28)\n
at addChunk (internal/streams/readable.js:293:12)\n
at readableAddChunk (internal/streams/readable.js:267:9)"
How can I make Mongoose also give the position in the original code where this error happens or at least name the query the error happened with? How it is right now it is a bit difficult to debug as the stack only shows internal Mongoose code.
I see a few "Slow query" message in the MongoDB logs, but remain oblivious which query in my Node.js code is producing this.