I’m getting this error when I’m using render or railway. So far I’ve tested both the connection string and network connectivity which both work. mongodb+srv://Username:Password@cluster0.npqhxto.mongodb.net/?retryWrites=true&w=majority
Error connecting to database: MongoServerSelectionError: connection <monitor> to 220.127.116.11:27017 closed
This error indicates the driver fails to find a server based on your preference (e.g. read preference).
What read preference you use? by default it should be primary, can you check if you have a primary running
i never use atlas. is your deployment a replica set or sharded cluster?
It’s a replica set with two secondary and one primary cluster.