hi everyone, hope u are doing fine. I tried connecting to mongo atlas on nextjs, i followed the tutorial from How to Integrate MongoDB Into Your Next.js App | MongoDB
after putting the env variables, and running yarn dev, i get the following error:
Error: querySrv ETIMEOUT _mongodb._tcp.djamelcluster.mqvig3i.mongodb.net
at QueryReqWrap.onresolve [as oncomplete] (node:internal/dns/promises:251:17) {
errno: undefined,
code: ‘ETIMEOUT’,
syscall: ‘querySrv’,
hostname: ‘_mongodb._tcp.djamelcluster.mqvig3i.mongodb.net’
}
as for the env variable, i did set in the correct username and password as well as put in the database name.
and i also added my ip address to the network access section of the mongo atlas (i added 0.0.0.0/0 so that it can be accessed from anywhere)
i did try to delete the cluster and initialize another one, but the problem still persists, it’s seems to be an issue with my internet or something like that.
any suggestions on how i can fix this issue?