One of my access_logs is 26GB...

4 posts / 0 new
Last post
#1 Wed, 10/06/2010 - 04:33
jmunjr

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.

Wed, 10/06/2010 - 09:24
andreychek

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

Wed, 10/06/2010 - 15:33
jmunjr

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.

Thu, 10/07/2010 - 04:13 (Reply to #3)
jmunjr

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 ?

Topic locked