Skip to content

Log directories will eventually consume 100G disc space #6848

@zwets

Description

@zwets

Logrotate gives warnings for three config files:

$ sudo logrotate -v -d /etc/logrotate.conf 2>&1 | fgrep -B1 warning
reading config file commcare-hq-gunicorn
warning: 'size' overrides previously specified 'daily'
reading config file monolith
warning: 'size' overrides previously specified 'weekly'
reading config file monolith-sprite_couchdb2
warning: 'size' overrides previously specified 'hourly

The size directive overrides the period (rather than "either-or"), which means that the log directories will eventually grow to massive size. Assuming 2x compression:

  • commcare-hq.gunicorn.log: no big deal: size 50M; rotate 5 means (1+5/2)*50M = 175M
  • /home/cchq/www/mint-sprite/log: size 750M; rotate 4 for 38 files (in my monolith): 38*(1+4/2)*750M = 85G
  • /opt/couchdb/var/log/couchdb.log: size 300M; rotate 100: 51*300M = 15G
  • /var/log/* (rsyslog, uses weekly in standard Ubuntu): size 750M; rotate 4 for 14 files: 14*(1+4/2)*750M = 31G

Clearly it will take considerable time to get to 100G, but given the lack of a time limit this volume will eventually be reached (also, these aren't the only log files). Maybe a periodic cron job to cull outdated log files?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions