Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle EAI_AGAIN and retry #68

Open
elsbrock opened this issue Oct 28, 2020 · 1 comment
Open

Handle EAI_AGAIN and retry #68

elsbrock opened this issue Oct 28, 2020 · 1 comment

Comments

@elsbrock
Copy link

We use this tool in our CI pipeline. Thanks for maintaining!

We noticed the following error occuring frequently when our infrastructure is under load:

Waiting for myhost:30017..........................
   Unknown error occurred waiting for myhost:30017: Error: getaddrinfo EAI_AGAIN myhost

It would be great if npx could handle EAI_AGAIN and retry.

@dwmkerr
Copy link
Owner

dwmkerr commented Sep 5, 2022

@elsbrock I'm doing some cleanup and saw this issue hadn't been responded to, is there any chance if you are still having issues you can run with debugging enabled, so I can see exactly where the error occurs and put the appropriate retry logic in? To run with debug info just use:

DEBUG=wait-port wait-for myhost:30017

If I can see where to stitch the handler I'll add a flag to allow for retry if DNS fails.

Note to self/contributors; if the error occurs where I think it occurs, we just need another block like this:

https://github.com/dwmkerr/wait-port/blob/main/lib/wait-port.js#L104

The existing waitForDns flag is probably OK to overload here, but might be worth considering a new flag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants