Re: [squid-users] can't get squid to cache

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Fri, 11 Jul 2008 14:01:01 +1200

Angelo Hongens wrote:
>
> Sorry, sent this mail directly to Hendrik.. Here it is to the list. I'm
> still pulling my hear out :(
>
>
> Henrik Nordstrom wrote:
>>> On ons, 2008-07-09 at 14:32 +0200, Angelo Höngens wrote:
>>>
>>>>> Is there any way I can force caching if the control headers are
>>>>> missing??
>>>
>>> refresh_pattern with a min age does this.
>
> I expect this line in my squid.conf should take care of that?
>
> refresh_pattern . 3600 100% 3600 ignore-no-cache ignore-reload
> override-expire override-lastmod
>
>
>
>>>>> Here's two records from access.log:
>>>>>
>>>>> 1215606505.637 1678 10.94.206.73 TCP_MISS/200 3262 GET
>>>>> http://10.94.206.77:8001/bin?id=ACC83639Zoover-NL&irversion=510
>>>>> - FIRST_UP_PARENT/10.94.206.34 text/html 1215606506.990 1352
>>>>> 10.94.206.73 TCP_MISS/200 3262 GET
>>>>> http://10.94.206.77:8001/bin?id=ACC83639Zoover-NL&irversion=510
>>>>> - FIRST_UP_PARENT/10.94.206.34 text/html
>>>
>>> Make sure you are not denying caching of query URLs (cache
>>> directive), and that there is a refresh_pattern with a min age.
>
> I expect these lines in my squid.conf to take care of that:
>
> acl all src 0.0.0.0/0.0.0.0
> cache allow all
>
>>>
>>> The best way to test is to use squidclient, both to Squid and the web
>>> server. This will show you exactly what is going on with no mangling
>>> of the HTTP headers what so ever.
>
> Exactly the same..
>
> source server:
> -------------------------------------------------
> [angelo_at_zvr-web-04 ~]$ squidclient -h 10.94.206.34 -p 8001
> "/admin?op=ping"
> HTTP/1.0 200 OK
> Content-Type: text/html
> Content-Length: 63
>
> dgraph zvr-end-04:8001 responding at Wed Jul 09 16:13:18 2008
> -------------------------------------------------
>
> local squid:
> -------------------------------------------------
> [angelo_at_zvr-web-04 ~]$ squidclient -h localhost -p 8001 "/admin?op=ping"
> HTTP/1.0 200 OK
> Content-Type: text/html
> Content-Length: 63
> X-Cache: MISS from zvr-web-04.zoovercolo.local
> Via: 1.0 zvr-web-04.zoovercolo.local:8001 (squid/2.6.STABLE16)
> Connection: close
>
> dgraph zvr-end-04:8001 responding at Wed Jul 09 16:13:53 2008
> -------------------------------------------------
>
>
> Any more ideas? Thanks in advance :)

The first request through cache is usually expected to MISS, its the
second which tells you whether or not the caching was success/failure.

Try:
   squidclient -h 10.94.206.34 -p 8001 "/admin?op=ping"
   squidclient -h localhost -p 8001 "/admin?op=ping"
   squidclient -h localhost -p 8001 "/admin?op=ping"

and see what the third response is.

If it still fails, configure "debug_options 22,9 20,5", purge the
cache.log and try the above three again. Hopefully the cache.log will be
left with a trace of what happend to non-cache the reply.

Amos

-- 
Please use Squid 2.7.STABLE3 or 3.0.STABLE7
Received on Fri Jul 11 2008 - 02:01:05 MDT

This archive was generated by hypermail 2.2.0 : Fri Jul 11 2008 - 12:00:03 MDT