My nodejs application connects to an external url and uses the response. The application works fine most of the time, but I am getting EAI_AGAIN occasionally.
error:{code:EAI_AGAIN, errno:EAI_AGAIN,syscall:getaddrinfo,hostname:**.com,host:***.com,port:443}
I went through some questions related to EAI_AGAIN. Did not solve my purpose. Saw that this error occurs when DNS name resolving fails.
My concerns are
1) When I checked the logs. There were many successful requests just before the failed request and also there were many successful requests just after the failed request. Why did it fail for only one request?
2) What could be the actual cause? I would like to know all the possibilities.
3) Can the reason be an issue on the external service to which we are connecting?
4) Will be great if anyone can help to recreate the issue.
Note: We are using docker containers. If this has anything to do.