Logrotate no longer works..."Too Many Open Files"

Mikkel L. Ellertson mikkel at infinity-ltd.com
Fri Jun 29 00:21:57 UTC 2007


Mike Burger wrote:
> The "current" logs were now being written to as named.log.1, messages.1,
> maillog.1.
> 
> But the files weren't recreated, and the postrotate scripts not run.
> 
> I looked in my /var/named/chroot/var/log/named dir, and found tons and
> tons of logs with oddball numberings.  I cleared them and will see how
> that goes.
> 
That sounds like syslogd and the other programs are not getting
notified about the log rotation, and are continuing to use the same
file, instead of creating/using the new file. This is normally
handled by the postrotate script in the logrotate config file for
the service. For example, in the case of syslog, the script runs:

/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null
|| true

This sends syslogd a HUP signal so it know to close the log files it
is using, and open new ones. If syslogd does not get the signal, it
continues to use the file it has open, and you get messages added to
files like messages.1 instead of messages. The trick is finding out
why this is happening. Do you have more then one copy of logrotate
running?

You may want to run "service syslog reload" to get syslog to start
using the new files while you are working on this.

Mikkel
-- 

A:  Because it messes up the order in which people normally read text.
Q:  Why is top-posting a bad thing?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20070628/c5bd4ad8/attachment-0001.sig>


More information about the fedora-list mailing list