AzureCosmosDB / data-migration-desktop-tool

MIT License
122 stars 46 forks source link

MongoCursorNotFoundException: Cursor not found on server using connection. #131

Open chandr-971 opened 4 months ago

chandr-971 commented 4 months ago

Hello!

I am performing a data migration from an un-sharded Azure Cosmos MongoDB (source) account to a sharded Azure Cosmos MongoDB account (sink). One of my collections in the source has ~250k documents. When running the dmt tool, I am running into a cursor not found exception when migrating this particular collection:

Data transfer failed
MongoDB.Driver.MongoCursorNotFoundException: Cursor <id> not found on server <fqdn:10255> using connection <connection_id>

The community forum has a few recommendation as mentioned here. I have tried to reduce BatchSize but in vain. I would like to have the ability to disable cursor timeouts. Is this possible to implement with the current implementation of the C# driver?

In addition, I've always noticed that this exception gets thrown at the 18000th record exact (I have reproduced this 3 times). That being said, I am not sure if it's really due to 10 minute cursor timeout...

Please advise. Your support is appreciated :)