Increase the execution interval for the tracker stats importer
@josecelano ya está trabajando en esto.
Desde el 24/4/2024.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Relates to: https://github.com/torrust/torrust-demo/issues/1
There is a background task that imports torrent stats from the Tracker. The Tracker Statistics Importer checks every 100 milliseconds if there are torrents to import. It executes a SQL query to fetch torrents that have not been updated in the last hour:
"torrent_id" INTEGER NOT NULL,
"tracker_url" VARCHAR(256) NOT NULL,
"seeders" INTEGER NOT NULL DEFAULT 0,
"leechers" INTEGER NOT NULL DEFAULT 0,
"updated_at" TEXT DEFAULT 1000-01-01 00:00:00,
FOREIGN KEY("torrent_id") REFERENCES "torrust_torrents"("torrent_id") ON DELETE CASCADE,
UNIQUE("torrent_id","tracker_url"),
PRIMARY KEY("torrent_id")
);
The field updated_at stores the last update date. You can configure the importer in the config file:
[tracker_statistics_importer]
torrent_info_update_interval = 3600
That configuration means the Index should try to update torrents at least every hour.
It seems querying the database every 100 milliseconds is overloading the demo server. Although it's a tiny instance, we should increase the interval. It could be a configuration option or even calculated manually in the future.
According to the data I've collected we could increase it from 100 milliseconds to 2000 milliseconds.
- Lenguaje dominante
- Rust
- Estrellas
- 100
- Forks
- 28
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de torrust/torrust-index
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
torrust/torrust-index#918 ·
-
Dependencies
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
torrust/torrust-index#865 ·
-
Feature/Mejoras - TorrustAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 18/100
torrust/torrust-index#816 · 1 comentario ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
torrust/torrust-index#815 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
torrust/torrust-index#814 ·
Todos los issues de torrust/torrust-index
Issues similares
-
My Caps shows "Shared" on private Caps that were never sharedPosiblemente ocupada @AksharP5 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
CapSoftware/Cap#4569 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Document Web UIAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
parquet: reject truncated BYTE_STREAM_SPLIT numeric pages instead of silently fabricating valuesAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día