GNOME Bugzilla – Bug 645046
Sqlite database growing continuously
Last modified: 2021-05-26 22:25:23 UTC
Hi, I've been moving files in and out of indexed directories to trigger update events on the tracker-store, and I noticed that the database is growing though the number of files within the store does not grow. Basically, what I do is executing that script : movein=1 while true; do if [ $movein = "1" ]; then echo "mv ~/work/perso/ ~/Pictures/" mv ~/work/perso/ ~/Pictures/ movein=0 else echo "mv ~/Pictures/perso/ ~/work/" mv ~/Pictures/perso/ ~/work/ movein=1 fi sleep 6 done which moves my 'perso' directory in and out of the tracker's radars. That directory contains about 400 pictures from my camera : -rw-r--r-- 1 user user 1791495 Mar 9 18:07 IMG_0059.JPG /home/user/Pictures/perso/IMG_0059.JPG: JPEG image data, EXIF standard 2.3 And about 30 video files (from the same camera) : -rw-r--r-- 1 user user 37202588 Mar 9 18:08 MVI_0230.MOV /home/user/Pictures/perso/MVI_0230.MOV: ISO Media, Apple QuickTime movie And about 10 video files (mostly divx/xvid) : -rw-r--r-- 1 user user 13172252 Mar 12 20:23 Sample.avi /home/user/Pictures/perso/Sample.avi: RIFF (little-endian) data, AVI, 720 x 304, 25.00 fps, video: XviD, audio: Dolby AC3 (5 channels, 48000 Hz) After a day of running that script, this is how is the database : $ du -sh ~/.cache/tracker/* 4.0K /home/user/.cache/tracker/db-locale.txt 4.0K /home/user/.cache/tracker/db-version.txt 4.0K /home/user/.cache/tracker/first-index.txt 4.0K /home/user/.cache/tracker/last-crawl.txt 35M /home/user/.cache/tracker/meta.db 4.5M /home/user/.cache/tracker/meta.db-shm 577M /home/user/.cache/tracker/meta.db-wal 4.0K /home/user/.cache/tracker/miner-applications-locale.txt 344K /home/user/.cache/tracker/ontologies.gvdb Now if I kill tracker and rip off the database (tracker-control -k -r) and restart the indexation : $ du -sh ~/.cache/tracker/* 4.0K /home/user/.cache/tracker/db-locale.txt 4.0K /home/user/.cache/tracker/db-version.txt 4.0K /home/user/.cache/tracker/first-index.txt 4.0K /home/user/.cache/tracker/last-crawl.txt 3.4M /home/user/.cache/tracker/meta.db 32K /home/user/.cache/tracker/meta.db-shm 1.2M /home/user/.cache/tracker/meta.db-wal 4.0K /home/user/.cache/tracker/miner-applications-locale.txt 344K /home/user/.cache/tracker/ontologies.gvdb
As mainly the meta.db-wal file grows but not the meta.db file, I suspect that an open SQLite cursor is blocking SQLite from writing the changes in the write-ahead log back into the main database file. A leaked cursor could be responsible for this. Please let us know if this happens only while accessing tracker from external applications as this would mean that they are leaking cursors.
The du command has been run without any application currently running and tracker (apart from tracker itself). Does that answer your question ?
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new enhancement request ticket at https://gitlab.gnome.org/GNOME/tracker/-/issues/ Thank you for your understanding and your help.