I received the above error after trying to connect to my mongo cluster via nodejs.
Here is my uri string with credentials omitted: mongodb://username:password@shard.mongodb.net:27017,shard.mongodb.net:27017,shard.mongodb.net:27017/admin?ssl=true&replicaSet=atlas-shard0&readPreference=primary&connectTimeoutMS=10000&authSource=admin&authMechanism=SCRAM-SHA-1
I also tested this when whitelisting all IP addresses and still getting the error. What am i doing wrong here?
@Stennie_X@Piti.Champeethong can you help on this… i’m working on mongoose with lambda function it would work first time but after sometime would get this error?
If your Lambda function works for a while and eventually runs into a connection error, I think this suggests you may have cached a stale connection and perhaps need some retry logic.