I am getting random restarts on a PM2 managed nodejs cluster. The only symptom I get on the error log is of the following pattern - an ENOTFOUND on dns.js. 

> 
> Error: getaddrinfo ENOTFOUND walkinto.inhttp walkinto.inhttp:80
>  at errnoException (dns.js:28:10)
>  at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:76:26)
> 
> 
> 

Clearly the problem is a malformed server name - **walkinto.inhttp** is incorrect and it should be **walkinto.in** . The challenge is that this is not a host name hard coded in the code. There are many places in this fairly large code base that makes name resolution and it is of dynamic nature. 

I have spent considerable time to pinpoint the root cause but so far have had no luck. I need help to print more log information from dns.js; probably a call stack 'may' would help to move forward. 

Q1 : How to enable more detailed logging on nodejs core modules?

Q2 : What could cause a nodejs restart to happen for an ENOTFOUND? How to avoid a restart - This path is not desirable.

Q3: Are there any other smarter way to trouble shoot this problem?