Opened 15 years ago
Last modified 11 years ago
#519 reopened defect
Allow deletion of old logs through web interface
Reported by: | anonymous | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 0.7 |
Component: | Administration interface | Version: | dev |
Keywords: | Cc: | mpotter@… | |
Operating System: |
Description (last modified by dfraser)
Original report:
I use the svn version of bitten with Apache 2.4 and trac 0.10.4 on a Windows Server 2003 RC2 SP 1. Over month many builds have produced a huge database of 1,85 GB. The build system runs about 10 platforms in parallel. We have committed about 3000 revisions over the past 12 months. Each build consists of 5 steps, each one with a complete command-line output of the compiler+linker we run. It seems trac stores all the logging of the builds in its project database and as we reached a size nearly of 2 GB, the whole server system becomes slow and even Apache crashes from time to time. I want to cut down the database and free it from the ancient build logging, but I've found no way to do so. The database size remains the same although I set a new (much higher) start revision in the admin web page of the bitten build configuration. I expected the database to reduce its size but it has not happen. Don't know what to do now. Seems it's not supported (?)
As of the 0.6 release series, the log files are now stored on the file system, which reduces the size of the actual database file.
This ticket is now being used as a request to be able to remove old log entries and files (hopefully through the web interface)
Attachments (0)
Change History (8)
comment:1 Changed 15 years ago by anonymous
comment:2 Changed 15 years ago by anonymous
OK, meanwhile I've found a solution by myself. Don't know if you can close this ticket now. I opened the trac.db of my project in the SQLiteDatabaseBrowser.exe and deleted all ancient records less a certain SVN revision with SQL queries, manually. After that I compacted the database. Now I have a size of 130MB again which is OK for me. :-) Maybe bitten should offer such cleanup by a new button e.g. "Forget old builds" in the admin menu.
I called:
DELETE FROM bitten_log_message WHERE log IN (SELECT id FROM bitten_log WHERE build IN (SELECT id FROM bitten_build WHERE rev < 23000 AND config = 'trunk')) File-->Compact DELETE FROM bitten_log WHERE build IN (SELECT id FROM bitten_build WHERE rev < 23000 AND config = 'trunk') DELETE FROM bitten_error WHERE build IN (SELECT id FROM bitten_build WHERE rev < 23000 AND config = 'trunk') DELETE FROM bitten_step WHERE build IN (SELECT id FROM bitten_build WHERE rev < 23000 AND config = 'trunk') DELETE FROM bitten_slave WHERE build IN (SELECT id FROM bitten_build WHERE rev < 23000 AND config = 'trunk') DELETE FROM bitten_build WHERE rev < 23000 AND config = 'trunk' File-->Compact
comment:3 Changed 15 years ago by dfraser
- Resolution set to fixed
- Status changed from new to closed
Note that in the 0.6 release series, the bitten log messages (the bitten_log_message table) are moved out of the database and into the filesystem - this makes them much easier to manage and reduces the database size considerably.
The upgrade to 0.6 releases also migrates the data for you... 0.6b2 was the last release but I'd recommend trying the svn version or waiting for the up-coming 0.6b3 to try this out...
I'm marking this issue as fixed on this basis but please feel free to reopen/comment more if you feel that it is still an issue in the 0.6 series
comment:4 Changed 15 years ago by anonymous
Thanks for the information. I'm going to try an update when you release 0.6b3. I hope it will work since I have some local changes... And is there a way to "forget" old log messages in a way that those files are deleted in the filesystem? As far as I remember increasing the minimum SVN version seemed not to touch the data.
comment:5 Changed 15 years ago by anonymous
in other words: should we reopen the ticket because it's still not possible via web interface to delete the old log messages?
comment:6 Changed 15 years ago by dfraser
- Component changed from Build master to Administration interface
- Description modified (diff)
- Milestone changed from 0.6 to 0.7
- Operating System Windows deleted
- Priority changed from major to minor
- Resolution fixed deleted
- Status changed from closed to reopened
- Summary changed from huge database cannot be cut down again to Allow deletion of old logs through web interface
OK, but I'll target it to the next milestone... clarifying in the summary and description too
comment:7 Changed 13 years ago by mpotter@…
- Cc mpotter@… added
comment:8 Changed 11 years ago by Steven R. Loomis <srl@…>
also see #779 compress build logs- looks promising
Sorry, here the correct version info of the trac server: Apache/2.2.6 (Win32) DAV/2 mod_ssl/2.2.6 OpenSSL/0.9.8e mod_autoindex_color mod_auth_sspi/1.0.4 mod_python/3.3.1 Python/2.4.4 SVN/1.4.5 PHP/5.2.4