-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logging table should be periodically truncated #778
Comments
Hi! I'm Shivam, interested in contributing to Kiwix for GSoC 2025, and this issue seems like a great fit for my skills. Quick question before I start: do you prefer having a separate cron job for truncating logs, or would you prefer integrating this cleanup directly within the log generation process? Happy to work on either approach. |
I would prefer doing it during generation, because the log generation is relative (last 7 days) and at that point, we know that we are posting a log for those 7 days and can delete anything older. |
@Shiv-aurora , how far have you gone with this? I am currently implementing #49 which could render this obsolete and would like to know if you have made significant progress with this or not. |
The
logging
table is set up to grow indefinitely. Recently we had an outage because it got too full:This was accelerated by the fact that "Articles by Quality" and "Category class" templates were merged, which basically generated a superfluous log entry for every article. However, even if that hadn't happened, the logs table would have eventually run out of space, since it only grows over time.
Since we only ever show logs for the past 7 days, we don't need to hold data older than 7 days. Although #49 would make this easier and bring its own benefits, at the very least we could have a cron job that deletes data older than 7 days, or do it as part of generating the logs.
The text was updated successfully, but these errors were encountered: