Search squid archive

RE: Beta testers wanted for 3.2.0.1 - Changing 'workers' (from 1 to 2) is not supported and ignored

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The cache_dir setting in the if..else ..endif does not seem to take effect.
Squid -z does create the cache subdirectory without issue, but the squid seems to use the default cache directory as if didn't see the if statement.

===== squid.conf====
workers 2
if ${process_number} = 1
cache_dir aufs /usr/local/squid/var/a 500 16 256
else
cache_dir aufs /usr/local/squid/var/b 500 16 256
endif
==============================

=====logs=========== 
2010/11/29 15:23:56 kid1| Starting Squid Cache version 3.2.0.3 for amd64-unknown-freebsd8.1...
2010/11/29 15:23:56 kid1| Set Current Directory to /usr/local/squid/var/cache
2010/11/29 15:23:58 kid1| basic/basicScheme.cc(64) done: Basic authentication Schema Detached.
2010/11/29 15:23:58 kid3| basic/basicScheme.cc(64) done: Basic authentication Schema Detached.
2010/11/29 15:27:04 kid3| Starting Squid Cache version 3.2.0.3 for amd64-unknown-freebsd8.1...
2010/11/29 15:27:04 kid2| Starting Squid Cache version 3.2.0.3 for amd64-unknown-freebsd8.1...
2010/11/29 15:27:04 kid1| Starting Squid Cache version 3.2.0.3 for amd64-unknown-freebsd8.1...
2010/11/29 15:27:04 kid3| Set Current Directory to /usr/local/squid/var/cache
2010/11/29 15:27:04 kid1| Set Current Directory to /usr/local/squid/var/cache
2010/11/29 15:27:04 kid2| Set Current Directory to /usr/local/squid/var/cache
FATAL: kid2 registration timed out
Squid Cache (Version 3.2.0.3): Terminated abnormally.
CPU Usage: 0.024 seconds = 0.016 user + 0.008 sys
Maximum Resident Size: 10312 KB
Page faults with physical i/o: 0
FATAL: kid1 registration timed out
Squid Cache (Version 3.2.0.3): Terminated abnormally.
CPU Usage: 0.024 seconds = 0.012 user + 0.012 sys
Maximum Resident Size: 10524 KB
Page faults with physical i/o: 0

Ming


-----Original Message-----
From: Amos Jeffries [mailto:squid3@xxxxxxxxxxxxx] 
Sent: November-29-10 9:08 AM
To: squid-users@xxxxxxxxxxxxxxx
Subject: Re:  Beta testers wanted for 3.2.0.1 - Changing 'workers' (from 1 to 2) is not supported and ignored

On 30/11/10 02:41, Ming Fu wrote:
> Hi Henrik,
>
> Thanks for point out that I need to use the if..else--endif statement, however, I can't find the condition macros for the if to test.
>
> For example,
>
> If "first worker"
> Cache_dir here ...
> Else
> Cache_dir there ...
> Endif
>
> How do I say the "first worker"?

if ${process_number} = 1
...
else
...
endif


Another method if you want a cache_dir for each is to have a numbered 
subdirectory for each worker:

   cache_dir aufs /var/cache/${process_number} ...

Then squid -z to create as usual. Just remember that this will take up N 
times the configured directory size.

Amos
-- 
Please be using
   Current Stable Squid 2.7.STABLE9 or 3.1.9
   Beta testers wanted for 3.2.0.3



[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux