[COMMITTED] app.ini: Run cron.archive_cleanup more often

Mark Wielaard mark@klomp.org
Wed Nov 6 00:41:20 GMT 2024


Most disk space is taken up by forgejo/data/repo-archive which stores
the cache of tar.gz and zip repo archive downloads. This can add up to
30GB in 24 hours. Which can cause out of disk issues since they are
only cleaned up once a day.

Run the cleanup task every half hour and remove archives after two
hours.
---
 config-files/srv/forgejo/app.ini | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/config-files/srv/forgejo/app.ini b/config-files/srv/forgejo/app.ini
index 4fc232dc9f77..f2a8e5e46995 100644
--- a/config-files/srv/forgejo/app.ini
+++ b/config-files/srv/forgejo/app.ini
@@ -93,6 +93,12 @@ ENABLED = true
 ENABLED = false
 TIMEOUT = 7200
 
+[cron.archive_cleanup]
+ENABLED = true
+RUN_AT_START = true
+SCHEDULE = @every 30m
+OLDER_THAN = 2h
+
 [session]
 PROVIDER = file
 
-- 
2.47.0



More information about the Forge mailing list