No suitable servers found (`serverSelectionTryOnce` set)

Hello,

I’m trying to connect to my collection but I get an error: No suitable servers found (serverSelectionTryOnce set).

The error occurs only on my dev environment, on production everything works fine.

I have checked that my IP address is authorized. I don’t understand where the problem comes from, if someone can enlighten me, I’m new on the techno.

Thanks

serverSelectionTimeoutMS determines the maximum amount of time to spend in the server selection loop. This defaults to 30 seconds, but applications will typically fail sooner if serverSelectionTryOnce is true and a smaller connectTimeoutMS value is in effect.

The original default was established at a time when replica set elections took much longer to complete. Applications can consider setting this option to slightly more than the expected completion time for an election