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

FetchError: request failed, reason: getaddrinfo EAI_AGAIN #28

Closed
doug-wade opened this issue Feb 22, 2024 · 1 comment
Closed

FetchError: request failed, reason: getaddrinfo EAI_AGAIN #28

doug-wade opened this issue Feb 22, 2024 · 1 comment

Comments

@doug-wade
Copy link
Contributor

doug-wade commented Feb 22, 2024

I left my bot up and running for about 15 days, and after about 2 weeks of polling every 10 minutes, I started to get this error on every request:

FetchError: request to https://lemmy.world/api/v3/post/list?type_=Subscribed&auth=<redacted> failed, reason: getaddrinfo EAI_AGAIN lemmy.world
    at ClientRequest.<anonymous> (/home/doug/workspace/Lemmy-Mega-Bot/node_modules/node-fetch/lib/index.js:1505:11)
    at ClientRequest.emit (node:events:518:28)
    at TLSSocket.socketErrorListener (node:_http_client:495:9)
    at TLSSocket.emit (node:events:518:28)
    at emitErrorNT (node:internal/streams/destroy:169:8)
    at emitErrorCloseNT (node:internal/streams/destroy:128:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  type: 'system',
  errno: 'EAI_AGAIN',
  code: 'EAI_AGAIN'
}

I think what's happened is that we're doing too many dns queries. I think we might want to investigate caching our dns lookups with something like cacheable-lookup to reduce the number of dns queries for the same server.

@doug-wade
Copy link
Contributor Author

This seems to have been a problem with Comcast's DNS lookup -- it was resolved when I changed my dns nameserver to 8.8.8.8.

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

1 participant