[squid-users] "Valid document was not found in the cache" forwarded to clients

Amos Jeffries squid3 at treenet.co.nz
Fri Feb 20 12:29:26 UTC 2015


On 20/02/2015 10:55 p.m., Corentin Delcourt wrote:
> Hello list.
> 
> I described this issue a few days ago on IRC and no-one could help me,
> so I am now turning to you. Here's my problem:
> 
> I run two squid servers, siblings with each other, let's call them A and
> B. When clients send requests to A, and A thinks B has the resource
> cached, but in reality B doesn't,

Use HTCP protocol between the peers, far less false positives than ICP
or digest.


> the client will get a 504 error with
> the message: “Valid document was not found in the cache and
> ‘only-if-cached’ directive was specified.” Vice versa if clients send
> requests to B.
> 
> I believe that A should catch this error and fetch the resource
> directly, but instead it forwards it to the client, and I cannot figure
> out why. I am not using allow-miss.

It should be but there are conditions to that:

* another source of the URL is actually accessible (think IPv6-only
websites, routing outages, DNS lookup failures, Path-MTU failures,
traffic blackholes, etc)

* there is time remaining within the forward_timeout for the alterative
route to be contacted. If the timeout occurs the last error state
encountered will be reported, if there is no earlier error the timeout
itself is mentioned.

* the 504 is not being cached. That error response is one which is
allowed to be cached by proxies if it gets delivered with cacheability
headers. NP: It could be cached and delivered by either proxy, so even
coming from the other one *it* may still have been cached and what
caused the "HIT" to be identified.


> 
> What confuses me even more is that this didn't happen a month ago, with
> the same setup.
> 

... what version of Squid?
... and is it the same setup AND version(s) of Squid from a month ago?


Amos


More information about the squid-users mailing list