Error while login in production environment but ok in development

I have created a website using nextjs, I have added authentication and am able to login in local host and get redirected very well. however in production environment i am getting an error “server selection timed out” “server configuration error” that seems to be coming from mongoDb. I wanted to know is there limitations on what I can do in the free tier on atlas? am suspecting the error must be coming from me login in from different ip addresses although i have enabled login from everywhere in mongodb network access

It might be VPN or firewall preventing outgoing connections.