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

Review missing timeouts #467

Open
3 of 4 tasks
Tracked by #470
josecelano opened this issue Feb 7, 2024 · 0 comments
Open
3 of 4 tasks
Tracked by #470

Review missing timeouts #467

josecelano opened this issue Feb 7, 2024 · 0 comments
Labels
Enhancement / Feature Request Something New EPIC Contains several subissues
Milestone

Comments

@josecelano
Copy link
Member

josecelano commented Feb 7, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement / Feature Request Something New EPIC Contains several subissues
Projects
Status: No status
Development

No branches or pull requests

1 participant