I have google app engine F1 and my app is trying to connect to mongodb atlas free tier cluster. I tested my app locally and it works fine. But I get following error when deploying to app engine. I configured my atlas to accept all IP so I don't think it's the IP issue. But I couldn't figure out why just from the error message.
2018-12-03 04:19:03 default[20181202t224815] "GET / HTTP/1.1" 500
2018-12-03 04:19:04 default[20181202t224815] production
2018-12-03 04:19:04 default[20181202t224815] (node:6)
DeprecationWarning: current URL string parser is deprecated, and will
be removed in a future version. To use the new parser, pass option {
useNewUrlParser: true } to MongoClient.connect.
2018-12-03 04:19:04 default[20181202t224815] { Error: querySrv
ESERVFAIL _mongodb._tcp.cluster0-kzjxb.mongodb.net
2018-12-03 04:19:04 default[20181202t224815] at
QueryReqWrap.onresolve
[as oncomplete] (dns.js:197:19)
2018-12-03 04:19:04 default[20181202t224815] errno: 'ESERVFAIL',
2018-12-03 04:19:04 default[20181202t224815] code: 'ESERVFAIL',
2018-12-03 04:19:04 default[20181202t224815] syscall: 'querySrv',
2018-12-03 04:19:04 default[20181202t224815] hostname:
'_mongodb._tcp.cluster0-kzjxb.mongodb.net' }