Best practices to purge large mongo DB files

Our log files are getting very large. We are using this instance for course development only, and we don’t need to keep any historical or logging data.

Question 1

  1. What is in the collection.wt files? Are these part of the tracking framework?
  2. If so, how to delete them safely. :slight_smile:
user@edx-dev:~$ sudo du -sh ./.local/share/tutor/data/mongodb/*
16K     ./.local/share/tutor/data/mongodb/collection-0--147136646650066405.wt
80K     ./.local/share/tutor/data/mongodb/collection-0--1703553222334909733.wt
9.8G    ./.local/share/tutor/data/mongodb/collection-0--6600061179900864205.wt
8.3G    ./.local/share/tutor/data/mongodb/collection-11--6600061179900864205.wt
52K     ./.local/share/tutor/data/mongodb/collection-2--147136646650066405.wt
48K     ./.local/share/tutor/data/mongodb/collection-2--1703553222334909733.wt

Many thanks,
Tony

I do not believe that these large files contain logs. Instead, they contain the actual data stored in collections 0 and 11. Can you attempt to identify these collections and profile their data usage?

Well, that solves that. It looks to be all course-related data (edx-platform/base.py at master · edx/edx-platform · GitHub).

modulestore.definitions.bson (one of the smaller files) contains a whole slew of data from various courses (quiz data, video and HTML blocks, etc.). fs.files.bson has file references. fs.chunks.bson contains mostly Xblock data (I got tired of scrolling :sweat_smile:)

I didn’t expect these files to get so big so quickly.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.