[squid-users] Do I need to modify squid.conf parameters?

From: <plendon@dont-contact.us>
Date: Mon, 31 Dec 2001 13:34:41 -0500

Hi All,

I've had incidents with squid and have been troubleshooting
the problem for some time, maybe you can help.

Background info: There are 18 remote proxies running on
RedHat Linux with 2.2.14-5 kernel. Each of the 18 proxies
go to one parent proxy on HP-UX 11.0. All squid versions
are 2.4.STABLE4. All squids were compiled with --enable-
kill-parent-hack.

Problem Description: Each night a main process is started
that remsh's to the 18 linux boxes and shuts down the
proxies. The proxies are shutdown so as not to interfere
with network traffic and the nightly processes. The
proxies are shutdown with /etc/rc.d/init.d/squid stop
(enclosed is startup/shutdown script). The shutdowns are
always successful.
When squid is shutdown it will return a "Y" for successful
or a "N" for non-successful shutdown. For the majority
of times, a "Y" is returned. A "N" has never returned.
However, sometimes nothing is returned (no "Y" and no "N")
and then I am notified that there might be a problem with a
proxy shutting down. I then log into the linux system and
see that squid has successfully shutdown.

What is happening? Squid has shutdown, but has not
returned a "Y". Enclosed is the shutdown script.
Somewhere in the script is a 30 second wait to ensure squid
has shutdown.

Could the squid shutdown be affected by a client
downloading or ftp'ing a large file when squid is being
shutdown?

Do I need to adjust squid's configuration parameters?
I'm not sure what parameters I need to adjust to help
troubleshoot problem further.

shutdown_lifetime 30 seconds
connection_timeout 2 minutes
peer_connect_timeout 30 seconds
client_lifetime 1 day
request_timeout 30 seconds
read_timeout 15 minutes
pconn_timeout 120 seconds
ident_timeout 10 seconds

Thank you in advance - all ideas or help is greatly
appreciated.

-Pat

#!/bin/sh
#
# Starts and stops squid proxy/cache server .
#

# See how we were called.

PIDLOG=/usr/local/squid/logs/pid.log
PIDFILE=/usr/local/squid/logs/squid.pid
SQUID_SHUTDOWN_TIMEOUT=30

case "$1" in
        start_msg)
                echo "Starting squid server"
                ;;
        stop_msg)
                echo "Stopping squid server"
                ;;
        start)
                echo "Starting squid server"
                /usr/local/squid/bin/squid
                ;;
        stop)
                # Log some info
                echo "`date`" > $PIDLOG
                echo "Squid processes are:" >> $PIDLOG
                ps -ef|grep squid|awk '{print $0}' >> $PIDLOG
                echo "netstat listing:" >> $PIDLOG
                netstat -a |grep 3128 >> $PIDLOG
                echo "lsof listing:" >> $PIDLOG
                    /usr/sbin/lsof -i :3128|awk '{print $0}' >> $PIDLOG

                echo "Stopping squid server" >> $PIDLOG
                /usr/local/squid/bin/squid -k shutdown
                RETVAL=$?
                echo $RETVAL >> $PIDLOG
        
                if [ $RETVAL -ne 0 ] ; then
                        echo "Squid still alive" >> $PIDLOG
                        sleep $SQUID_SHUTDOWN_TIMEOUT
                        SQUID_PIDS=`ps -ef|grep squid|awk '{if ($8 != "grep" && $9 != "squid" && $10 != "stop") print $2}'`
                        echo "What are the remaining processes?" >> $PIDLOG
                        echo $SQUID_PIDS >> $PIDLOG
                        2>&- kill -15 $SQUID_PIDS
                        if [ -f $PIDFILE ] ; then
                           PID=`cat $PIDFILE`
                           echo $PID >> $PIDLOG
                           RETVAL=1
                           echo $RETVAL >> $PIDLOG
                        else
                           RETVAL=0
                           echo $RETVAL >> $PIDLOG
                        fi
                else
                        echo "squid shutdown on first try" >> $PIDLOG
                        echo $RETVAL >> $PIDLOG
                 fi
                ;;
        restart)
                echo "Re-read squid conf file"
                /usr/local/squid/bin/squid -k reconfigure
                ;;
        *)
                echo "Usage: /sbin/init.d/squid {start|stop|restart}"
                exit 1
esac

exit $RETVAL
Received on Mon Dec 31 2001 - 11:35:03 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:05:31 MST