squid not stopping through rc script

myha

Member


Messages: 34

#1
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?
 

vivek

Aspiring Daemon

Thanks: 194
Messages: 805

#2
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..
 
OP
OP
myha

myha

Member


Messages: 34

#3
Aha, ok, than thanks. I thought there was smth wrong, but you are right - if I wait longer it does restart...
 

hydra

Well-Known Member

Thanks: 27
Messages: 272

#4
If you just want to apply your newly configured settings, it's not necessary to stop/start squid, reload instead.
 

DutchDaemon

Administrator
Staff member
Administrator
Moderator
Developer

Thanks: 2,670
Messages: 11,235

#6
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
 
OP
OP
myha

myha

Member


Messages: 34

#10
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.
 
OP
OP
myha

myha

Member


Messages: 34

#11
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
 

Mel_Flynn

Well-Known Member

Thanks: 81
Messages: 379

#14
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.
 
Top