[squid-users] Squid, sarg and incorrect shutdown

From: Davide Marzaloni <dmarzaloni@dont-contact.us>
Date: Tue, 11 Jan 2005 08:52:02 +0100

Hi everyone.
I'm experiencing a recently-discovered problem with my setup:

- Slackware 1.0
- kernel 2.4.26
- squid-2.5.STABLE6-20040907
- ncsa_auth authentication squid module
- sarg-1.4.1

Every night at 2:00AM the following script is started by cron:

[START SCRIPT1]
/usr/local/squid/sbin/squid -k shutdown
/usr/bin/sarg
/usr/local/sbin/archivia_log_squid
/usr/local/squid/sbin/squid
[END SCRIPT1]

The '/usr/local/sbin/archivia_log_squid' script simply archives the squid
logs:

[START SCRIPT2]
cd /var/squid
tar cvzf /var/squid/logs.tgz /var/squid/logs
ACTDATETIME=`date +%y%m%d-%H%M`
export ACTDATETIME
mv /var/squid/logs.tgz /var/squid/squid-logs_$ACTDATETIME.tgz
rm /var/squid/logs/*
[START SCRIPT1]

Recently I noticed that during working-time, when a 'squid -k reconfigure'
command is performed, the reply is 'no running copy', even if the
squid-processes works fine (if not, my users will kill me: how can they try
to download GBs of MP3 :-) )!!!
No 'squid -k shutdown' or 'squid -k reconfigure' command can be performed
without receiving 'no running copy' message.
I thought the shutdown command doesn't complete before the 'sarg' command is
performed, so I modified SCRIPT 1:

[START SCRIPT1 MODIFIED]
/usr/local/squid/sbin/squid -k shutdown
sleep 120
killall squid
sleep 120
/usr/bin/sarg
/usr/local/sbin/archivia_log_squid
/usr/local/squid/sbin/squid
[END SCRIPT1 MODIFIED]

The 'killall squid' command took some time to complete, but it seems to be
correctly completed within the sleep-time.

Furthermore I noticed the squid-logs_xxxxxxx-tgz file is very small, like no
logs were correctly saved by the squid process, for 6 days (the same period
within I experienced the 'no running copy' message !!!!)

Tonight this script has worked perfectly (I will check next nights), but I'm
worried about this 'pre-problem signal': is there anyone experiencing the
same problem (incorrect shutdown) and found a solution?

Bye

Davide
Received on Tue Jan 11 2005 - 00:52:16 MST

This archive was generated by hypermail pre-2.1.9 : Mon Mar 07 2005 - 12:59:35 MST