Getaddrinfo EAI_AGAIN dns error

Describe the problem/error/question

I have around 10 workflows polling google sheets every 5 minutes and on a small amount of cases I get a dns error (like one out of 30). Since this is the trigger I can’t retry it. I’ve had a similar problem on a different project also based on an alpine image of node and moving to a debian based one solved it. From what I’ve read alpine images were not recommended for network intensive apps (not sure how true this is but changing it did solve it for me). There used to be a debian image but I didn’t see it on the most recent versions. Do you plan on supporting it or do you have any alternatives for this problem?

What is the error message (if any)?

Workflows status just say “Could not complete”

Please share your workflow

Its just a google sheet trigger that fails.

Information on your n8n setup

  • **n8n version: 1.14.2 (its not the latest version but this has been happening for a long time)
  • **Database: pg
  • **Running n8n via (Docker, npm, n8n cloud, desktop app): docker, queue mode, 3 workers, redis
  • **Operating system: ubuntu 20.04

Hey @pedrogius,

Welcome to the community :raised_hands:

We moved away from the Debian based image as it was more technical effort to maintain and test on every release, It is however possible for you to create your own image if needed that could use Debian.

Sadly when it comes to DNS issues there are not really a lot of options, One thing I would maybe try is using a different DNS server or maybe set up a local DNS cache and go through that first to see if it changes anything.

I’ve set it up with google’s dns and it’s working better. Thanks for the tip!

However, I’m still finding it hard to recover from errors where the trigger fails. I have jobs with status unknown where I can see that the trigger had an error but I’m not sure how I recover from this. I have retry on fail but it still errors out. The latest one is:

{"message":"500 - {\"error\":{\"code\":500,\"message\":\"Internal error encountered.\",\"status\":\"INTERNAL\"}}","name":"Error","stack":"Error: 500 - {\"error\":{\"code\":500,\"message\":\"Internal error encountered.\",\"status\":\"INTERNAL\"}}\n    at createError (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/createError.js:16:15)\n    at settle (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:17:12)\n    at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:269:11)\n    at IncomingMessage.emit (node:events:529:35)\n    at IncomingMessage.emit (node:domain:489:12)\n    at endReadableNT (node:internal/streams/readable:1368:12)\n    at processTicksAndRejections (node:internal/process/task_queues:82:21)"}

This is new though, I’m not getting the DNS errors anymore. How would you handle this in an error workflow where the polling was supposed to pick up new rows on google sheets? I’m writing a new column in the sheet when the workflow is successfully executed but I think this is a read intensive request because every now and then I get a 429 from google, and their limits are already pretty generous.

Thanks so much for the help!

Hey @pedrogius,

If you are already retrying and Google is still returning a 500 error there is not really a lot that can be done other than increasing the amount of retries until it does work. Personally I wouldn’t use a Google Sheet as a database so if you were working with a lot of data I would use something like Baserow / Seatable / NocoDB / Airtable which I have seen work a lot better.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.