[squid-users] instances/queues when same script for multiple external_acl_type rules

Alex Rousskov rousskov at measurement-factory.com
Tue Jul 11 15:20:26 UTC 2023


On 7/11/23 11:00, Kevin Kretz wrote:

> I have a script that queries a database when a request is made to
> squid.  It handles two different types of request:  those made from
> authenticated users, and unauthenticated requests which can be
> allowed based on the requesting host.

> Requests of each type are defined with a different external_acl_type
> definition in squid.conf and different arguments are sent to the
> script depending which type it is.

> Recently we hit the limits of the default children_max and its
> associated queue length.  It was addressed by increasing children_max
> - but it made me wonder:  if I have two external_acl_type rules
> calling the same external script, does squid maintain separate counts
> for the script instances associated for each external_acl_type
> definition?  Does


> external_acl_type children-max 10 host_based blah blah blah script.py
> external_acl_type children-max 10 user_based blah blah blah script.py

> ... have a max of 10 instances for each acl_type?  Or 10 instances total?

The above external_acl_type configuration lines appear to contain 
out-of-order tokens and other syntax violations, but children-max limit 
(and all other external_acl_type parameters) are dedicated to the 
corresponding external_acl_type. Squid may start 10 helper instances for 
each external_acl_type (with a unique external_acl_type name), even if 
all of them have the same script name.

BTW, AFAICT by glancing through Squid source code and without testing, 
Squid does not reject configurations with multiple external_acl_type 
lines that use the same external_acl_type name parameter value (a Squid 
bug). Squid will effectively ignore all but the very first such line.


HTH,

Alex.



More information about the squid-users mailing list