Skip to content

Review missing timeouts #603

Closed
Closed

Description

@josecelano

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

Recently we have had problems with the live demo because the http_health_check binary does not have a timeout. Healthchecks started by the docker daemon are waiting forever if they don't receive a response, consuming more and more resources until the container crashes.

There are more places where we could have such problems. I'm going to describe here some places potentially affected by this type of issue.

Potentially affected code

Healthcheck binary

It's used in the tracker but also in the Index.

It's currently being fixed:

Tracker API

It uses Axum. All services using Axum have the same problem. For more info see the issue opened in the Index. It applies the same here.

HTTP Tracker

It also uses Axum.

UDP Tracker

We do not use any framework. We handle requests directly with a loop.

  • We don't have timeouts.

  • If I'm not wrong all requests are executed sequentially. We don't use threads. If one request takes forever for some reason the server can not handle more requests and there is no timeout.

  • Add timeout to UDP tracker request processing #609

@da2ce7 is working on some improvements like:

  • Create a worker that can handle 50 requests at the most.
  • It spawns a new thread for each request.
  • It implements a graceful shutdown waiting for the active requests to finish when the application receives a halt signal.

I think he has not added yet the timeout feature.

By the way @WarmBeer since you are working on performance issues:

I wonder if improving the repository can improve the UDP tracker since requests are handled sequentially anyway or am I missing something @WarmBeer?

Tracker Checker

Conclusion

There might be other cases.

Relates to:

Activity

  1. self-assigned this
    on Jan 16, 2024
  2. added this to the v3.0.0 milestone on Jan 16, 2024
  3. moved this to BUG & Security in Torrust Solutionon Jan 16, 2024
  4. moved this from BUG & Security to In Progress in Torrust Solutionon Jan 17, 2024
  5. mickvandijke commented on Jan 24, 2024

    @mickvandijke
    Contributor

    I wonder if improving the repository can improve the UDP tracker since requests are handled sequentially anyway or am I missing something @WarmBeer?

    Yeah the performance improvements I'm working on only improve parallel access to the torrent repository. Sequential access should be the same.

    #565

  6. modified the milestones: v3.0.0, on May 15, 2024
  7. josecelano commented on May 15, 2024

    @josecelano
    MemberAuthor

    All known issues on the server side have been solved. For the client side, @da2ce7 did it (at least for the Tracker Checker), but it's still pending to merge.

  8. removed their assignment
    on Jun 11, 2024
  9. removed this from the milestone on Jun 26, 2026
  10. added theissue type on Oct 13, 2026
  11. self-assigned this
    on Nov 9, 2026
  12. added 4 commits that reference this issue on Nov 11, 2026
  13. josecelano-bot commented on Nov 16, 2026

    @josecelano-bot
    Contributor

    Every item in this EPIC's checklist is now done: #597, #604, #609, #677, #678, #679 and #682 were already closed, and #612 and #613 are fixed by #2813 (tracked in #2776).

    The tracker's request-rate and connection-limit gaps are not timeout issues; they are tracked in EPIC #2411 (case A1).

    Disposition and evidence, recorded in the repo: related-issues.md. This issue can be closed once #612 and #613 are closed.

  14. added 2 commits that reference this issue on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions