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

doc(ETIMEDOUT): updating network family autoselection timeout to avoid ETIMEDOUT error #3738

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

gregonarash
Copy link

This relates to...

#2990 (comment)
and likely more issues facing ETIMEDOUT errors related to network family selection ipv4/ipv6

Rationale

Doc update to help debug ETIMOUTED error

Changes

New Doc file added

Features

N/A

Bug Fixes

N/A

Breaking Changes and Deprecations

N/A

Status

N/A

 updating network family autoselection timeout to avoid ETIMEDOUT error

### Increasing timeout by updating Node options in package.json

On example of a NextJS project:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
On example of a NextJS project:
One example with a Next.js project:


The default timeout depends on local Node version, on Node 18.13.0 and above is 250 milliseconds.

### Increasing timeout by updating Node options directly
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Increasing timeout by updating Node options directly
### Increasing timeout by updating `NODE_OPTIONS` directly


If you are experiencing `TypeError: fetch failed` and you are able to investigate the `cause: AggregateError` and see `code: 'ETIMEDOUT'` it can be very likely due to timeout network family autoselection. This tends to happen with DNS resolving domain to multiple ipv4 and ipv6 addresses.

The default timeout depends on local Node version, on Node 18.13.0 and above is 250 milliseconds.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The default timeout depends on local Node version, on Node 18.13.0 and above is 250 milliseconds.
The default timeout depends on local Node version, on Node.js 18.13.0 and above is 250 milliseconds.


`export NODE_OPTIONS="--network-family-autoselection-attempt-timeout=500"`

### Increasing timeout by updating Node options in package.json
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Increasing timeout by updating Node options in package.json
### Increasing timeout by updating `NODE_OPTIONS` in package.json

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

Successfully merging this pull request may close these issues.

fetch fail: cause: AggregateError [ETIMEDOUT]:
4 participants