Doing a compulsory migration to Atlas, due to the buyout of mlab. My app now crashes with this error - any help appreciated.
MongoError: Cannot use (or request) retryable writes with limit=0
at Function.MongoError.create (/Users/me/.meteor/packages/npm-mongo/.3.0.7.1t7fkt4.mpst++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/mongodb-core/lib/error.js:45:10)
at toError (/Users/me/.meteor/packages/npm-mongo/.3.0.7.1t7fkt4.mpst++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/mongodb/lib/utils.js:149:22)
at /Users/me/.meteor/packages/npm-mongo/.3.0.7.1t7fkt4.mpst++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/mongodb/lib/collection.js:1201:39
at handler (/Users/me/.meteor/packages/npm-mongo/.3.0.7.1t7fkt4.mpst++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/mongodb-core/lib/topologies/replset.js:1209:22)
at /Users/me/.meteor/packages/npm-mongo/.3.0.7.1t7fkt4.mpst++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/mongodb-core/lib/connection/pool.js:544:18
I can just tell you that Atlas has been cake to configure with multiple Meteor projects/apps for me.
I’ve not done a migration before, but maybe you could create a new empty Meteor app & connect Atlas to make sure you’ve got the basics down.
Then take what you learn from there and apply it to your current project. Atlas runs 3 node clusters as a minimum configuration, so you can set a “write concern”:
Also MongoDB 4.0+ requires you to set Retryable Writes to true
This error suggests to me that you might have some issues with your write configurations:
MongoError: Cannot use (or request) retryable writes with limit=0
Here is a helpful post on MongoDB Atlas + Meteor:
Configuring your write concern can be done by adding this to your MONGO_URL string in your settings.json file:
&w=majority
In MongoDB 4.0+ this is set to false, by default so I have added this on the ends of my MONGO_URL config in my settings.json file