0

When I attempt a GET request from my mlab db, I get the following error: (node:47578) UnhandledPromiseRejectionWarning: MongoNetworkError: failed to connect to server [ds157439.mlab.com:57439] on first connect [MongoNetworkError: connection timed out]

It was working but when I came back to the code a few hours later, I got this error.

CB721
  • 256
  • 4
  • 15

2 Answers2

0

I Faced the similar issue.
I updated the connection string and the application was up and running:

Go to Mongo DB -> Cluster -> Connect -> Connection string

Nimantha
  • 6,405
  • 6
  • 28
  • 69
sr007
  • 66
  • 3
0

After further digging, I found out that MLAB is run on AWS and that AWS for my region was down during the time I was attempting to connect to MLAB.

CB721
  • 256
  • 4
  • 15