Heroku Error connecting to db: connect ECONNREFUSED 127.0.0.1:27017

I deployed my app to Heroku and set up my production database at Mongodb Atlas. However, whenever I try to open my app on Heroku, I get this error: Error connecting to db: connect ECONNREFUSED 127.0.0.1:27017. I have already set my MONGODB_URL and MONGODB_URI config values on Heroku but I am still getting this error. I have attached a screenshot of Heroku error logs below:

Please help me out I am going crazy here.