Re: [squid-users] A way/hack to force squid to die?

From: <david_at_lang.hm>
Date: Thu, 9 Jun 2011 13:32:47 -0700 (PDT)

On Thu, 9 Jun 2011, Helmut Hullen wrote:

> Hallo, Tom,
>
> Du meintest am 09.06.11:
>
>
>> I need to verify, if I get a mail when squid dies (I put a correct
>> mailaddress in cache_mgr-directive). Is there a way/hack to force
>> squid to die?
>
> Yes - this daemon is started from a script p.e. with the command
>
> /etc/init.d/squid start
>
> (the command depends on your distribution).
>
> And stopping squid is nearly the same command.
>
> Brute force (under a linux distribution):
>
> killall squid
>
> (if you are curious: repeat the command)

actually, you do need to repeat the command. Squid doesn't stop immediatly
when it gets the standard kill signal (15), it does some sort of graceful
shutdown that can take a significant amount of time to actually take
place.

I ran into this when trying to upgrade squid, if I do "killall squid;
/etc/init.d/squid start" I frequently get a message from the start that
squid is still running, but then a little while later squid will stop (and
since the start command failed, an outage occures)

I've also found that the number of killall cycles you need to go through
varies depending on the squid version and config, with versions other than
3.2 with more than one worker I need to do two killall commands to get
squid to stop, with 3.2 and more than one worker I find I need three.

what I do is to do killall squid in a loop until the killall command
returns an error that there is no process to kill.

David Lang
Received on Thu Jun 09 2011 - 20:32:55 MDT

This archive was generated by hypermail 2.2.0 : Fri Jun 10 2011 - 12:00:01 MDT