Re: [squid-users] Re: how distribute squid loads to cpus and memories using SMP feature??

From: Amos Jeffries <>
Date: Sun, 27 Oct 2013 19:20:57 +1300

On 27/10/2013 5:51 a.m., Ahmad wrote:
> well , actually i dont use squid -k restart
> but i do
> 1-
> /usr/sbin/squid -k shutdown
> /usr/sbin/squid -k shutdown
> /usr/sbin/squid -k shutdown
> to make sure it

This schedules 3x signals for shutdown in the kernel. It does take some
time for Squid to shutdown (shutdown_timeout config setting plus a few

- The first signal begins squid graceful shutdown process. Equivalent to

- The second arriving while that is hapening causes an immediate halt,
equivalent to SIGABRT (with all the same side effects as a crash.)

It is quite likely that this is where several of your cache problems are
coming from as process abort causes corruption of any incompletely
written objects.

- third signal goes nowhere because the kernel has no squid process running.

> 2-
> then i start it by
> /usr/sbin/squid
> it equals to squid -k restart !

Not quite. With -k restart the coordinator explicitly schedules only one
signal to each worker then restarts itself.
The code is not quite there yet, but with -k restart the workers may
continue running existing transactions in a more graceful exit than they
can with a hard shutdown.

> but after that when i type ps aux | grep squid ,
> i find squid working !!!!

Yes you started it in step #2.

> thats was the problem "in my analysis"
> the solutino was ,
> when dealing with smp options in squid , and i want to restart it ,
> i must do
> *killall -9 squid*
> after that no squid running in the background
> then its safe to run squid by
> /usr/sbin/squid

OR, you must have more patience. How long did you wait for the shutdown
to complete? if it was more than 60 seconds there may be a problem which
needs to be sorted out differently (kill -9 is not the right long term
solution) but since you were getting the "Exiting normally" messages I
think it is working properly but slow.

> thats what happed with me and it longed 2 days searching about no thing !!!!
> now in the logs i dont see
> *2013/10/26 18:36:58 kid2| Squid Cache (Version 3.3.9): Exiting normally.
> 2013/10/26 18:36:58 kid3| Squid Cache (Version 3.3.9): Exiting normally.*

You will only see that in the logs if the workers finished their
graceful -k shutdown or -k restart process.

Received on Sun Oct 27 2013 - 06:21:02 MDT

This archive was generated by hypermail 2.2.0 : Sun Oct 27 2013 - 12:00:06 MDT