SSG constantly results in etaddrinfo ENOTFOUND with +2500 pages
See original GitHub issueBug 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:
- Go to ‘…’
- Click on ‘…’
- Scroll down to ‘…’
- 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:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The issue seems to stem from the fact that I was doing the following in a lot of my
getStaticProps
functions:This made for a LOT of parallel requests which it couldn’t handle
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.