When one of the servers in the replica set is taken down or goes down, the application times out trying to connect to the replica set.
don't know what to do differently. Is there a programming pattern for handling this? Running Mongodb 3.4.24 on Windows servers.
Try to add
readPreference=primaryPreferredto the connection string.In case when the primary is not available, then the driver should re-connect automatically.