kiwix/container-images

Too many download.kiwix.org page views

Closed this issue · 2 comments

… in comparaison to unique visitors.

It seems to be due to the log-uploader mechanism that is stateless and re-reads the file and happens to not grow duplicates forever because the access.log file is rotated.

Fixed in k8s using the following:

  • nginx logs are rotated daily with a delaycompress and a date suffix
  • rotation happens at 01:00am
  • log upload configured to use the rotated file at 02:00am and 02:30am (openzim/kiwix)

Difference with previous solution:

  • we won't see today's download stats on the dashboard. We used to have 1h old stats for download. Now it will be up to 24h old
  • we'll have a single, large upload per day when we used to have 24 longer-and-longer uploads per day. This will save some resources during upload but depending on how matomo works, we may have a more resources usage after that big chunk of data to ingest.