Re: [squid-users] squid 3.4.0.2 + smp + rock storage error

From: Alexandre Chappaz <alexandrechappaz_at_gmail.com>
Date: Fri, 22 Nov 2013 10:53:28 +0100

Hi,

I added a loop waiting for the end of all squid processes ( with 30
seconds limit, I don't want to loop forever ..) and it did the trick :

for i in {1..30}
do
sleep 1
        pidof 'squid' > /dev/null
        pssquid=$?
if [ "$pssquid" -eq "0" ];then
        echo "Attente fin de process squid-z" >> /var/tmp/demarrage-squid.txt
else
        echo "tous les process sont terminés" >> /var/tmp/demarrage-squid.txt
        break
fi
done

Thanks for your input.

Maybe this info has it's place here :
http://wiki.squid-cache.org/Features/SmpScale#Troubleshooting

Regards
Alex

2013/11/21 Alexandre Chappaz <alexandrechappaz_at_gmail.com>:
> Thanks and yes this is exactly what we are doing.
> I will modify the init script so that it waits for the effective end of the
> squid-z before starting the daemon.
>
> Le 20 nov. 2013 18:16, "Alex Rousskov" <rousskov_at_measurement-factory.com> a
> écrit :
>
>> On 11/20/2013 02:19 AM, Alexandre Chappaz wrote:
>>
>> > I have the same kind of error but what bugs me is that I cannot
>> > reproduce this systematically. I am really wondering if this is a
>> > permission PB on shm mount point and / or /var/run/squid permissions
>> > :
>> >
>> > some times the service starts normally ( worker kids stay up ) and
>> > some times some or all of the the worker kids die with this error :
>> >
>> > FATAL: Ipc::Mem::Segment::open failed to
>> > shm_open(/squid-cache_mem.shm): (2) No such file or directory.
>>
>>
>> This is usually caused by two SMP Squid instances running, which is
>> usually caused by incorrect "squid -z" application in the system
>> startup/service scripts. YMMV, but the logs you posted later seem to
>> suggest that it is exactly what is happening in your case.
>>
>> Do you run squid-z from the system startup/service script? If yes, does
>> the script assume that squid -z ends when the squid -z command returns?
>> If yes, the script should be modified to avoid that assumption because,
>> in recent Squid releases, the squid-z instance continues to run (in the
>> background) and clash with the regular squid instance started by the
>> same script a moment later.
>>
>> There was a recent squid-dev discussion about fixing squid-z. I am not
>> sure there was a strong consensus regarding the best solution, but I
>> hope that squid-z will start doing nothing (Squid will just exit with a
>> warning message about the deprecated option) in the foreseeable future
>> while Squid instances will be capable of creating missing directories
>> runtime, when needed (and allowed) to do so.
>>
>> More details and a call for volunteers at
>> http://www.squid-cache.org/mail-archive/squid-dev/201311/0017.html
>>
>>
>> HTH,
>>
>> Alex.
>>
>
Received on Fri Nov 22 2013 - 09:53:35 MST

This archive was generated by hypermail 2.2.0 : Fri Nov 22 2013 - 12:00:04 MST