I have quite an intensive operation that has a MongoCursor
run in a loop for a few hours (on a vb.net app running via the c# driver. I'm not too sure what causes it but I run into an exception after a while
Cursor not found
This could be because of a cursor timeout, perhaps? Is there a way I can stop it happening? If its a timeout issue how do I place a longer timeout?
By developing with C# and MongoDB together one opens up a world of possibilities. Console, window, and web applications are all possible. As are cross-platform mobile applications using the Xamarin framework.
The official MongoDB Node. js driver allows Node. js applications to connect to MongoDB and work with data. The driver features an asynchronous API which allows you to interact with MongoDB using Promises or via traditional callbacks.
Is MongoDB Free? You can get started with a MongoDB developer sandbox in MongoDB Atlas for free with basic configuration options. No credit cards are required to provision a cluster, and you can use it to explore and learn more about MongoDB Atlas, the database-as-a-service platform from MongoDB.
You can disable the cursor's timeout in the C# driver by calling:
cursor.SetFlags(QueryFlags.NoCursorTimeout);
Otherwise it will be closed after 10 minutes of inactivity.
Reference
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With