Skip to content

Review missing timeouts #467

@josecelano

Description

@josecelano

Relates to: torrust/torrust-tracker#603

I've opened this issue to collect and track all past, current and future problems related to timeouts.

I'm going to describe here some places potentially affected by this type of issue.

Potentially affected code

Healthcheck binary

Index API Server

It uses Axum. All services using Axum have the same problem. For more info see:

Index API Client

The Index API client does not have timeouts.

Client: https://github.com/torrust/torrust-index/blob/develop/src/web/api/client/v1/client.rs

That leads to some problems like the one described here. The seeder command uses the Index API to upload random torrents (for testing purposes).

Sometimes a request waits forever. We should add a timeout to the client and retry later. I do not know why the server is not responding. That's a different problem.

Tracker API Client

The Index API client does not have timeouts.

Client: https://github.com/torrust/torrust-index/blob/develop/src/tracker/api.rs

Image Proxy

let reqwest_client = reqwest::Client::builder()
    .timeout(Duration::from_millis(settings.image_cache.max_request_timeout_ms))
    .build()
    .expect("unable to build client request");

It already has the timeout:

[image_cache]
max_request_timeout_ms = 1000
...

cc @WarmBeer @da2ce7

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions