zoraxy icon indicating copy to clipboard operation
zoraxy copied to clipboard

[ENHANCEMENTS] Rotation of statistics / turning off statistics

Open Morethanevil opened this issue 4 months ago • 2 comments

Is your feature request related to a problem? Please describe. After wondering about a backup taking extremely long, I saw that die filesize of my sys.db in the Zoraxy root folder was about over 28GB. I deleted this file and set up my Zoraxy account again and a few settings. After 5 days of running, the file was at 1,2GB again. After investigation with the help from Toby, we found out, that I get a lot of visitors because my server does federate with others. I run Lemmy and GoToSocial on it, both federate with a lot of servers. This federation is counted by the statistics.

Describe the solution you'd like I want to completely turn off the stats, may be per host or all at once. A better approach would be something like the log rotation. Keeping one or two months of stats, then drop the rest.

I tried clearing the stats, but the filesize did not shrink. It is not possible to clear all the stats too, you need to select a time period.

Describe alternatives you've considered The file is called sys.db, so I thought there is only system in there :) Deleting the file is another option, but you will need to recreate the login account for Zoraxy again. Not the best approach.

Additional context Interesting thing is, that my other servers do have a lot of traffic too, but only the ARM-server has the problem with the increasing filesize. My main server has Mastodon on it, it federates too.

Morethanevil avatar Nov 02 '25 15:11 Morethanevil

Image

Just got this working tonight, shd be in the coming release.

tobychui avatar Nov 05 '25 13:11 tobychui

Today I had enough time to do the following:

  1. I build the v3.3.0 binary for the arm server
  2. Deleted the sys.sb and reconfigured Zoraxy
  3. Set all proxy hosts to "Disable statistic collection"
  4. Made a screenshot of the new size (the old sys.db grew to 2GB in a few days)
Image

Will keep an eye on it. I will wait this week, it should not grow this tall this time.

Thanks for looking into this Toby :)

Morethanevil avatar Nov 09 '25 10:11 Morethanevil

Checked again - sys.db has 120kb. Issue resolved for me. Maybe a "clear all stats" function would be nice to shrink the file if it gets too big.

Morethanevil avatar Nov 19 '25 09:11 Morethanevil

Released in v3.3.0-rc1

tobychui avatar Nov 23 '25 06:11 tobychui