Skip to content

What is the unit of a read (for a read timeout)? #2950

@konstin

Description

@konstin

reqwest offers a read_timeout option, which can be set to avoid the process getting stuck indefinitely while still allowing large downloads to take a long time. I'm trying to figure out what the correct value for a widely deployed CLI application is that often runs in unreliable environments such as GitHub Action. For that I'm wondering, what is the unit of a read, what counts as read? For example, if a read timeout of 10s failed, does this mean that no package was received from the server in the last 10s? Or does it require a specific throughput, e.g. a certain number of KB?

In that context, do we need to set a connect_timeout if we set a read_timeout, or should we set them to separate values? The documentation doesn't really say anything about best practices using these functions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions