sameersbn / docker-gitlab

Dockerized GitLab
http://www.damagehead.com/docker-gitlab/
MIT License
7.91k stars 2.14k forks source link

Very large log files #1544

Open vitalyzhakov opened 6 years ago

vitalyzhakov commented 6 years ago

Hello!

I think, gitlab container takes up a lot of disk space.

root@edc9dbd271eb:/var/log/gitlab# du --max-depth=1 -h
1.5G    ./nginx
8.8G    ./gitlab
286M    ./gitlab-shell
735M    ./supervisor
12G .

May be exists cron script for cleaning up old logs?

drujd commented 6 years ago
root@8da3f4eb72b2:/home/git/gitlab# /etc/cron.daily/logrotate
error: /etc/logrotate.conf:7 unknown group 'syslog'

But that's probably not just it. Logrotate needs some different default config, gitlab logs can grow a LOT over 52 weeks...

hardikns commented 6 years ago

Can log rotate be fixed in upcoming release? Is it something that needs to be fixed in ubuntu base image?

drujd commented 6 years ago

The problem with "unknown group 'syslog'" has already been fixed and merged. Another possible problem is that sidekiq has its own log rotation that conflicts with logrotate.

I have solved this by disabling sidekiq rotation, modifying logrotate settings (to rotate based on size) and running logrotate hourly, not daily.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had any activity for the last 60 days. It will be closed if no further activity occurs during the next 7 days. Thank you for your contributions.

josefglatz commented 4 years ago

@drujd do you do the logrotate in the host system or in the container? https://github.com/sameersbn/docker-gitlab/issues/1544#issuecomment-384103487

nullaegy commented 2 months ago

we have the same issue, is there any progress with this?