Re: [squid-users] SQUID Logrotate problem

From: Will Roberts <ironwill42_at_gmail.com>
Date: Thu, 21 Jul 2011 01:44:12 -0400

On 07/18/2011 06:33 PM, Amos Jeffries wrote:
> Sounds like the problem is in logrotate. The squid -k rotate with
> logfile_rotate 0 just closes the logs and reopens whatever is now using
> the filenames. logrotate is fully responsible for moving the file and
> creating a new one ready for the squid re-open to shift to.
>
> Check for file permissions.
>
> Amos
>

Sorry to jump in here, but I think I just saw the same problem using
3.1.12 on one of my machines.

Logrotate properly moves the file and then calls "/usr/sbin/squid3 -k
rotate" to have squid release the file and reopen it. That call returns
without error, however squid continues to write to the old file, now
/var/log/squid3/access.log.1 and no /var/log/squid3/access.log is ever
created. I tried manually running /usr/sbin/squid3 -k rotate as root and
that had no effect. If I instead do /etc/init.d/squid3 reload which
sends a SIGHUP to the process then the file is released and reopened as
expected.

This does not seem to happen 100% of the time, but once a rotate fails,
it will continue to fail until squid is restarted or SIGHUP'd. This is a
new box that's been up since about July 2nd, and this has happened 3
times that I know of. My logs are rotated hourly. As far as I know, I
have never seen this happen on any of my other machines.

If there are any related fixes between 3.1.12 and 3.1.14 I can grab the
source and build a newer version. Otherwise is there any logging or
debug information I can provide?

Regards,
--Will
Received on Thu Jul 21 2011 - 10:59:19 MDT

This archive was generated by hypermail 2.2.0 : Fri Jul 22 2011 - 12:00:02 MDT