One of my access_logs is 26GB...

I ran logrotate in verbose mode and got this:

rotating pattern: /var/log/virtualmin/sitexxx.com_access_log /var/log/virtualmin/sitexxx.com_error_log weekly (5 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/virtualmin/sitexxx.com_access_log
log does not need rotating
considering log /var/log/virtualmin/sitexxx.com_error_log
log does not need rotating
not running postrotate script, since no logs were rotated
not running postrotate script, since no logs were rotated

/var/log/virtualmin/sitexxx.com_access_log is definitely 26.3GB…

Thoughts?

Also when I first tried running logrotate I got this error:
error: vsftpd.log:7 duplicate log entry for /var/log/xferlog

I removed vsftpd.log from logrotate.d and that let me proceed further.

Howdy,

Logrotate doesn’t work by file size, it works by the age of the logfile. It seems to think that it’s not yet time to rotate that particular log.

If you look in your access log, what is the date of the first log entry mentioned in there?

-Eric

Well I checked a couple of them and they go back to February ! I migrated to a new server in early September and no rotation since then.

Ok so when I used -f it ran… Lol the gzipped archive is 2.3GB…

/usr/sbin/logrotate -v -f /etc/logrotate.conf

Do you think this is something that will fix itself? What should I check to make sure it runs ?