Context: To connect to my free and shared tier cluster, I’m using the python code
uri = "mongodb+srv://<username>:<password>@cluster0.w029iod.mongodb.net/?retryWrites=true&w=majority"
client = MongoClient(uri, server_api=ServerApi('1'))
and sometimes it works, but sometimes I get the error stating that the SSL handshake failed.
I even tried using the X.509 method with and the SSL handshake failure error message still happens 50% of the time
client = MongoClient(uri,
tls=True,
tlsCertificateKeyFile=‘path/to/file.pem’,
server_api=ServerApi(‘1’))