Page MenuHomeSoftware Heritage

Limit size of most common log files
Closed, MigratedEdits Locked

Description

Right now, most common log files such as /var/log/messages or /var/log/user.log are allowed to grow unbounded.
This has already caused disk space to become critically low on some machines.
It would be a good idea to rotate them immediately once they reach a critical size.

Event Timeline

Proposed change, already applied manually on uffizi and a few other hosts:

diff --git a/logrotate.d/rsyslog b/logrotate.d/rsyslog
index d75287c..ba454a7 100644
--- a/logrotate.d/rsyslog
+++ b/logrotate.d/rsyslog
@@ -26,6 +26,7 @@
 {
        rotate 4
        weekly
+       maxsize 100M
        missingok
        notifempty
        compress