I have a node.js app connected to a Mongo DB database,
I'm using the mongo URI link to connect from my web app.
I'm using DigitalOcean and I deployed the app to Heroku in order to check if I manage to avoid the:
failed to handshake with Mongo Error
for some reason, everything works great locally but when I deploy to production, I get this error accessing the production URL:
MONGODB Failed to handshake with db-shard-00-02-xyz.mongodb.net:27017: Mongo::Error::SocketError: EOFError: end of file reached (db-shard-00-02-xyz.mongodb.net:27017, TLS)
My Heroku config file:
production:
clients:
default:
uri: <%= ENV['MONGODB_URI'] %>
options:
connect_timeout: 20
Thanks in advance.
所有评论(0)