Re: [squid-users] Why are cache_peer_access acls called 4 times in a row?

From: Elli Albek <elli_at_sustainlane.com>
Date: Sun, 19 Oct 2008 01:27:25 -0700 (PDT)

Thanks.
So if the web server did not understand what domain is served the first call, why would it understand in the next calls? It eventually returns the right page. The web server log shows only one call. The web server returns the right page when you call this URL from wget or a browser with an IP number and without a domain (and eventually squid gets the right page too), it has a default context.

By the way if I take out the cache_peer and cache_peer_access and do always direct instead, everything seems to work properly.

E

----- Original Message -----
From: Amos Jeffries <squid3_at_treenet.co.nz>
To: Elli Albek <elli_at_sustainlane.com>
Cc: squid-users_at_squid-cache.org
Sent: Sat, 18 Oct 2008 21:25:32 -0700 (PDT)
Subject: Re: [squid-users] Why are cache_peer_access acls called 4 times in a row?

Elli Albek wrote:
> Hi,
> I have a simple setup for testing accelerator:
>
> http_port 127.0.0.4:80 accel defaultsite=1.2.3.4:80
> cache_peer 1.2.3.4 parent 80 0 no-query originserver name=parent_sl
> acl my_acl urlpath_regex ^/rev/
> acl port80 port 80
>
> http_access deny !port80
> http_access allow port80
> cache_peer_access parent_sl allow my_acl
>
> There are no other acls and configuration except from what is in the base
> squid.conf.default.
>
> When I request a URL from squid I can see in the trace that the acl "my_acl"
> is executed 4 times consecutively. This acl is only used in
> "cache_peer_access parent_sl" once and in no other place.
>
> The following trace shows up in the log 4 times one after the other, and in
> all of them it is a success (returning 1):
>
> aclCheckFast: list: 003CA058
> aclMatchAclList: checking my_acl
> aclMatchAcl: checking 'acl my_acl urlpath_regex ^/rev/'
> aclMatchRegex: checking '/rev/288/scripts/v2/lib/util.js'
> aclMatchRegex: looking for '^/rev/'
> aclMatchRegex: match '^/rev/' found in '/rev/288/scripts/v2/lib/util.js'
> aclMatchAclList: returning 1
> aclCheckFast: list: 003CA058
>
> What is the reason for that? Other acls in the file are invoked only once
> (seen in the trace), but acls on cache_peer_access are always called 3 or 4
> times.

4 connection attempts were tried?
   ie request failed because the web server doesn't understand what
domain is supposed to be served when asked for
   http://127.0.0.4/rev/fubar

Amos

-- 
Please use Squid 2.7.STABLE4 or 3.0.STABLE9
Received on Sun Oct 19 2008 - 08:27:27 MDT

This archive was generated by hypermail 2.2.0 : Sun Oct 19 2008 - 12:00:04 MDT