Search squid archive

Re: squid - kid registration timed out

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

 





On 04/12/17 21:58, carlos wrote:
Hi Amos,

Yes i think i did all the adjustments, different pid file, log dirs,
proccess names, listening port...

it also happens after startup, sometimes after a random time, load is not
the problem since the server is not taking requests yet.

The config is this (i swapped real values for X):

acl all src all
acl SSL_ports port X X X
acl Safe_ports port X-X
acl CONNECT method CONNECT

http_access allow CONNECT SSL_ports all
http_access allow CONNECT Safe_ports all

acl ftp proto FTP
always_direct allow FTP
http_reply_access allow all
http_access allow ftp
icp_access allow all

http_access allow localhost
http_access allow all


pid_filename /var/run/squid.pid

http_port 80

http_access allow manager localhost
http_access deny manager

logfile_rotate 30

visible_hostname squid_8080_${process_number}

cache deny all

logformat access       %{%d-%m-%Y %H:%M:%S}tl.%tu %<pt %<tt %>a %Ss/%03>Hs
%<st %rm %>ru %un %Sh/%<a %mt
access_log /var/log/squid/access8080_${process_number}.log logformat=access
cache_log /var/log/squid/cachelog8080_${process_number}.log

acl XXXX dstdomain xxxxx.zzz
url_rewrite_access allow XXXX
url_rewrite_access deny !XXXX
url_rewrite_program /bin/rewrite


workers 4


Do you see anything wrong?



I see a few things that indicate you are confusing instance and process.

"squid" is a daemon manager *already* wrangling a whole collection of processes (<https://wiki.squid-cache.org/Features/SmpScale#Terminology>). The ${process_*} macros are a temporary workaround for distinguishing how those SMP worker processes interpret a config line and has nothing to do with multi-instance Squid.

To run multiple *instances* with Squid-3+ you need to us the -n command line option and assign a unique service name to each instance. That must be used by all scripts and manual commands you run. That is sort of a weak sandbox for the instances' SMP things to work within. If you omit that option on the command line you are using the default "squid" namespace.

In squid.conf the ${service_name} macro is replaced with that -n assigned name to make values for the directives that need to be unique without having to make multiple squid.conf.

For example; the pid_filename directive default value in Squid-4 has become:
 pid_filename /var/run/${service_name}.pid


If you do not use -n option then the SMP workers will be registering themselves to the wrong coordinators and re-arranging each others shared memory spaces randomly. Quite a nasty mess happens.

As a result Squid-3 versions which are SMP-enabled but not supporting -n service names cannot be used in a multi-instance environment. That means all Squid-3.1 through 3.4.

Amos
_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users




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

  Powered by Linux