Skip to content

18.14.1 release altered fetch timeout defaults from 300s to 30s #46706

@mccaig

Description

@mccaig

Version

v18.14.1

Platform

Linux

Subsystem

undici

What steps will reproduce the bug?

  1. Make a request using the fetch API that takes longer than 30 seconds. Using the defaults it will fail, in my case, with cause: HeadersTimeoutError: Headers Timeout Error

How often does it reproduce? Is there a required condition?

Any request that exceeds 30 seconds for headers or body content.

What is the expected behavior?

Default timeout should remain at 300s as in the previous 18.14.0 release

What do you see instead?

Timeout occurs at 30 seconds.

Additional information

The 18.14.1 release updated the undici client, which had recently altered the header and body timeout defaults to 30 seconds, down from 300 seconds as a result of this commit: nodejs/undici#1870

The defaults have since been changed back to 300s in the client: nodejs/undici#1937

So it looks like a fix is simply a matter of bumping to the new undici release.

Metadata

Metadata

Assignees

No one assigned

    Labels

    fetchIssues and PRs related to the Fetch API

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions