retitle 343922 apt-proxy: cleanup_freq timer is reset with each program run thanks
Hi, this has bitten me quite strongly, see this part of my config. ;;-------------------------------------------------------------- ;; Cache housekeeping ;; Time to perform periodic housekeeping: ;; - delete files that have not been accessed in max_age ;; - scan cache directories and update internal tables cleanup_freq = 60d ;; Maximum age of files before deletion from the cache (seconds) max_age = 14d ;; Maximum number of versions of a .deb to keep per distribution max_versions = 2 If you realize that it's often useful to restart apt-proxy when it goes mad, then you can imagine what happens with such a setting. My cache serves only two clients, but it contained nearly 2200 packages, with a total of 2.3G. Looking at the file ctimes, the packages dated back until October 2005, that's two years ago... Here's a workaround for this bug, patching apt_proxy/apt_proxy.py to run the cleanup procedure once on startup: --- apt_proxy.py 2005-05-16 06:24:20.000000000 +0200 +++ apt_proxy_cleanonstartup.py 2007-07-29 23:08:27.000000000 +0200 @@ -1745,7 +1745,7 @@ self.recycler = misc.MirrorRecycler(self, 1) self.recycler.start() if (self.cleanup_freq != None): - reactor.callLater(self.cleanup_freq, self.periodic) + self.periodic() import apt_pkg apt_pkg.InitSystem() Applying this patch and restarting apt-proxy made my cache immediately drop to 180 packages and 85M. Nikolaus -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]