Increase the execution interval for the tracker stats importer
@josecelano ci sta già lavorando.
Dal 24/4/2024.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
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.
- Lingua principale
- Rust
- Stelle
- 100
- Fork
- 28
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di torrust/torrust-index
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
torrust/torrust-index#918 ·
-
Dependencies
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
torrust/torrust-index#865 ·
-
Feature/Mejoras - TorrustAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 18/100
torrust/torrust-index#816 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
torrust/torrust-index#815 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
torrust/torrust-index#814 ·
Tutte le issue di torrust/torrust-index
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
I maintainer di solito rispondono entro 1 giorno
-
marketing
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
difficulty: easy docs help wanted tooling
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
-
bug help wanted ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
userFRM/egui-charts#4386 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
eliasstravik/herdr-projects#1605 · 1 commento ·