question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SSG constantly results in etaddrinfo ENOTFOUND with +2500 pages

See original GitHub issue

Bug report

Describe the bug

After the SSG build went above 2000 pages, the whole build process starts failing with ENOTFOUND errors. My guess is that it has to do with hitting a limit on the maximum number of HTTP connections (I read somewhere it might be the internal dns resolver in node).

Has anyone else encountered this?

Error occurred prerendering page "/de/city/philadelphia/chinatown". Read more: https://err.sh/next.js/prerender-error:
Error: Failed to render serverless page
Automatically optimizing pages ...FetchError: request to https://bounce.cdn.prismic.io/api/v2/documents/search?page=1&pageSize=50&orderings=%5Bmy.press_items.priority%20desc%5D&ref=XrCLmBAAACEAWAw3&q=%5B%5Bat(document.type%2C%20%22press_items%22)%5D%5D failed, reason: getaddrinfo ENOTFOUND bounce.cdn.prismic.io
    at ClientRequest.<anonymous> (/Users/aleks/projects/bounce/v2/app/apps/marketing/.next/serverless/pages/[lang]/blog.js:11522:11)
    at ClientRequest.emit (events.js:305:20)
    at TLSSocket.socketErrorListener (_http_client.js:423:9)
    at TLSSocket.emit (events.js:305:20)
    at emitErrorNT (internal/streams/destroy.js:84:8)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  message: 'request to https://bounce.cdn.prismic.io/api/v2/documents/search?page=1&pageSize=50&orderings=%5Bmy.press_items.priority%20desc%5D&ref=XrCLmBAAACEAWAw3&q=%5B%5Bat(document.type%2C%20%22press_items%22)%5D%5D failed, reason: getaddrinfo ENOTFOUND bounce.cdn.prismic.io',
  type: 'system',
  errno: 'ENOTFOUND',
  code: 'ENOTFOUND'
}

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Go to ‘…’
  2. Click on ‘…’
  3. Scroll down to ‘…’
  4. See error

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

System information

  • OS: macOS
  • Browser (if applies) [e.g. chrome, safari]
  • Version of Next.js: 9.4.6
  • Version of Node.js: 13.5.0

Additional context

Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
Aleksioncommented, May 5, 2020

The issue seems to stem from the fact that I was doing the following in a lot of my getStaticProps functions:

const [promise1, promises2, promise3, promise4, promise5, promise6] = await Promise.all([fn1, fn2,fn3,fn4,fn5,fn6])

This made for a LOT of parallel requests which it couldn’t handle

0reactions
balazsorban44commented, Jan 29, 2022

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node.js getaddrinfo ENOTFOUND - Stack Overflow
I got this issue resolved by removing non-desirable characters from the password for the connection. For example, I had these characters: <##% and...
Read more >
Node.js Error Message “getaddrinfo ENOTFOUND localhost ...
If you try to run your JSON server and see this error message “getaddrinfo ENOTFOUND localhost,” it's happening because Webpack cannot find your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found