Why my logs files and Docker images are to big in terms of size (MB/GB)?

Hi,
I would like to know why the log files and Docker images are really big in my Open edX installation, I am using JUNIPER and the latest version of Tutor.

all.log >> +15GB
tracking.log >> 800MB

Also, a couple of Docker images are really big 12GB and 90GB.
May I know If I need to configure something in Tutor to reduce the increase of these files?
Or I need to make a maitenance in the files and image, if so, what´s commands can I use

Thanks for your support
Regards,

These log files are large because, well, you’ve had a lot of traffic for a long time :slight_smile: The LMS and CMS store all logs to all.log, and tracking logs, which are then used for analytics, are stored in tracking.log. If you have no use for these files you can simply delete them.

I find this surprising. Are you talking about Docker images or containers? Which ones? How did you discover that? The largest Docker image in Tutor is “openedx” which should not exceed ~824 MB (Docker Hub).

Btw @herwingrodriguez if you are running Juniper then it means that you are definitely not running the latest version of Tutor. After Juniper, Tutor was upgraded to Koa (December 2020) and Lilac (June 2021).

Hi
Thanks for your quick response.
I cleaned the logs from tutor but the issue with the containers still persists.
This is the status of my server.

Filesystem                  Size  Used Avail Use% Mounted on
udev                         12G     0   12G   0% /dev
tmpfs                       2.4G  247M  2.2G  11% /run
/dev/mapper/edump--vg-root  156G  144G  4.3G  98% /
tmpfs                        12G  4.0M   12G   1% /dev/shm
tmpfs                       5.0M     0  5.0M   0% /run/lock
tmpfs                        12G     0   12G   0% /sys/fs/cgroup
/dev/loop2                   43M   43M     0 100% /snap/certbot/1150
/dev/loop1                   62M   62M     0 100% /snap/core20/1026
/dev/loop0                   43M   43M     0 100% /snap/certbot/1201
/dev/loop4                   33M   33M     0 100% /snap/snapd/12159
/dev/loop5                   62M   62M     0 100% /snap/core20/975
/dev/sda1                   720M  110M  574M  17% /boot
/dev/loop6                   33M   33M     0 100% /snap/snapd/12398
tmpfs                       2.4G     0  2.4G   0% /run/user/1001

13M	0f0065efd7f1f25c28a496fe56a6844143e7fe898b9b977eaef77172433ee104
828K	1bf41cca6c70602c36683e0d7d85fd01ccfd21b4f103387926c3c1f4d1018f54
18M	54637fbfe090624090007dd02719985eaf3243f409c8515b75aef48d57b1fd53
6.2M	73030d2e11f8da3d91bb76cc66235702f7d272f11f7f23022425cad8d4db4303
249M	7de33a28bdfc485c5b13b997db4df35c6b6b110fe160b52b1f9d962317bb8445
3.7G	be79f913d8e5fe1b35e448fb201ba477a5fabf38a575c47bab11d5010436eb03
**95G	c32d1dc6d8e18e2559b699df339ca91da6d1500f2f8aa42953a59da560411744**
7.0M	d343f5e79890fc3ad1b8b04b1c0d4540b8bbcf25b31e9b59ea8dbeec6c59d517
13M	e84d66a6123a5232e7ec92df6976123523402e273bc85d1560109ce7fab2407f
12G	efd84d83741bcf0fef4276f0523d464f2a0a00b971a4b503d258fc0a4bb4f023
4.6M	fec84dc23cfc976bbe3a7f4deb5e720bd5465219db5c3e1657b4a09127052620
tutor_local_lms-worker_1
c32d1dc6d8e1        overhangio/openedx:11.2.5         "docker-entrypoint..."   4 weeks ago         Up 8 minutes        8000/tcp                                   tutor_local_lms_1

If you can see we have a container of 95GB.
May I know if we can run the following command?

docker system prune -f

If we run it, the Open edX will be working?, If I can not use it, may I know the commands that I need to execute too release the space of the disk.

Thanks for your support.

I believe running docker system prune -f should be safe, since you will not prune volumes. But it’s not going to resolve you main issue, which is that you have a single container using up a lot of space.

I cannot help you further because you did not indicate what command you used to print the space used by the containers. Is it the space used by the Docker log files? Is it the container itself? If the container generates a lot of data inside of itself, then we have a problem. We are not supposed to accumulate a lot of data like this. If it’s simply the Docker process which is collecting container logs in the file system, then the problem will go away by restarting the lms container.

Hi

Thanks for your answer
I used this command: du -sh * on /var/lib/docker/containers

I consider that the issue is with the container because the size of the original image is around 2GB

overhangio/openedx 11.2.5 e4f91c380688 3 months ago 2.55GB

About the volumes the folder is empty

Thanks for your support

Can you please find out which file(s) are taking up the most space in /var/lib/docker/containers/c32d1dc6d8e18e2559b699df339ca91da6d1500f2f8aa42953a59da560411744?

Hi,

Thanks for your support, this is the file that is takin most space.
107G c32d1dc6d8e18e2559b699df339ca91da6d1500f2f8aa42953a59da560411744-json.log

Regards,

This is the log file generated by Docker that includes all the logs emitted by the container since it started. Just restart the container (tutor local restart lms) and it should go away.

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