No connection to MongoDB from Replit

Absolutely, but if you are using the free or on of the shared tier you get what you pay for, a cluster that is affected by what the other people/applications are doing.

I have seen some post about people doing performance assessment on the free/shared tiers. It sure slows you down if you are on the same shared tier.

But so far, nothing shows the issue is on Atlas side. It might be replit. The error ENOTFOUND is strictly DNS related. The resolution is not made by Atlas. It is highly distributed and cached. I did not looked at the TTL values but if one side received ENOTFOUND then it looks like the resolver on this erring side is the culprit.

By the way, are you using the SRV style URI or the old style where replica set hosts are individually specified.

The following

is a big misunderstanding of DNS. Atlas is supplying the DNS information. Your application, using the driver, is not able to find the DNS information. Your side is not able to find the information. DNS is the pillar of the internet that allows everything to work with names rather than numbers. When we query on our side with a reliable resolver it works.

One quick fix is to use google’s 8.8.8.8 and 8.8.4.4 free DNS servers. I just do not know how to bypass replit DNS resolvers to use google’s.

The other fix, if you really think that Atlas is the issue, is to have manage your own mongod servers.