squid not stopping through rc script

Hi guys,

I am having some problems with restarting the squid service through rc script...

Code:
[root@server ~]# /usr/local/etc/rc.d/squid stop
Stopping squid.
Waiting for PIDS: 857, 857, 857, 857, 857, 857, 857[B]^C[/B]
[root@server ~]# /usr/local/etc/rc.d/squid stop
Stopping squid.
[root@server ~]#

as you can see it hangs for the first time, then I interrupt it with ctrl+c, do restart again and after that it works instantly....

Any idea?
 
It takes time to stop and restart. I've 100 of proxy user at any given time and if I had to stop it may take up to 2-5 minutes to clean out everything. So nothing is new here..
 
Aha, ok, than thanks. I thought there was smth wrong, but you are right - if I wait longer it does restart...
 
If you just want to apply your newly configured settings, it's not necessary to stop/start squid, reload instead.
 
Code:
#  TAG: shutdown_lifetime       time-units
#       When SIGTERM or SIGHUP is received, the cache is put into
#       "shutdown pending" mode until all active sockets are closed.
#       This value is the lifetime to set for all open descriptors
#       during shutdown mode.  Any active clients after this many
#       seconds will receive a 'timeout' message.
#
#Default:
# shutdown_lifetime 30 seconds
 
Hi,

thanks for all the replies. I was aware of reconfigure command etc, but currently the server is in testing so I stop it manually also and it took quite some time.
 
btw has anyone managed to make webalizer to work with squid correctly? It seems no matter which option/format I choose some field is missing in report... ?

this is the best so far, but the requested URLs are stripped - domain is missing in reports...:
Code:
squid.conf:
access_log /var/log/squid/webalizer/access.log combined
logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh

webalizer:
LogType clf
 
Tip

Add this to /etc/rc.conf:
Code:
rcshutdown_timeout="90"

Since squid will take up the full 30 seconds of the default setting already, you will get watchdog_timeout messages and shutdown will abort running further shutdown scripts.
This may leave your data and worst case, disk in undesired state.

You may need to adjust this up pending the amount of time squid takes under production load.
 
Back
Top