[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Raq4 - Error rotating logs with 1gb of ram!



----- Original Message ----- 
From: "Yahoo" <jjma100@xxxxxxxxxxx>
To: <cobalt-users@xxxxxxxxxxxxxxx>
Sent: Sunday, December 21, 2003 12:51 PM
Subject: [cobalt-users] Raq4 - Error rotating logs with 1gb of ram!


> Hello,
>
> Experiencing failures with cron.daily and rotating the access log file
> which is causing me to have to reboot the server every morning to make it
> work again. And this is even after I've installed two 512mb modules of ram
> into the server a while back. Our log files aren't that big:
>
> -rw-r--r--    1 root     root     25349127 Dec 21 12:36 access
>
> so why the problems? We have about 20 sites (at most) and no scripts run
at
> the time cron.daily carries out it's duties. The error this morning from
> cron.daily was:
> ==================================
> errors occured while rotating /var/log/httpd/access
>
> error running prerotate script -- 
> leaving old log in place
> ==================================
>
Hi Jima 100

This event occured with me two days ago and rapidly reached a crisis
point... the  var/maillog for example was growing as I watched  ... 100MB
plus... RAM was not the issue.

You say the issue wasn`t log files.. my symptoms were exactly the same and
it was... check in /var/log and var/httpd/
If there aren`t any large logfiles in there then ignore the
following....also please note I don't use Webaliser or provide site stats to
users.

Clearly there were two issues
1. What was causing this....
2. How to keep the show on the road

Issue #1 is now being sorted for me with some help from our tech suppport
Issue #2  I sorted like this... (I`m not saying this is a good solution but
it worked for me and I now have a stable RAQ again)

There is an executable at /etc/cron.daily/logrotate. This is run once a day
and does the log rotation. If you add the following to the top of the
script:

rm /home/sites/site*/logs/*.log
rm /var/log/httpd/access
rm /var/log/httpd/error

That will delete all your web/mail and ftp log files. Note: These will be
unrecoverable!
Then once, logrotate is actually run, it will have no log files to parse.

If you want to keep all the log files, and just let them grow without
rotating, stick the line:

exit

at the top of the script.

Cheers