Description
I know this isn't too helpful of a report, so my feelings won't be hurt if you just close it :)
I noticed I had a connection string of the form
mongodb+srv://username:[email protected]/test?retryWrites=true&w=majority
and I assume the "test" db name is from some old tutorial from mongo. I seem to recall thinking that was odd years ago when I first saw it.
Anyway, today, on a dev mongodb 7.0.1 cluster, there were some sporadic issues with the mongo client throwing "Authentication failed" errors periodically. Many connections were working simultaneously, but I'd say one out of every 10-20 connections was throwing this error (using the same connection string).
During troubleshooting, I copied the connection string from the mongodb atlas webapp, and noticed that the difference between the provided string and the one that I had was that the previous connection string I have used for several years had this "test" db name parameter in it:
My old connection string:
mongodb+srv://username:[email protected]/test?retryWrites=true&w=majority
Atlas example provided connection string:
mongodb+srv://username:[email protected]/?retryWrites=true&w=majority
Once I removed it, all of the connection failures stopped.
Any idea? Seems... strange!
Thanks