I found the cause of my problem !! Apparantly curl uses BY DEFAULT the pragma : no-cache option ... This means indeed that the WC never caches the pages. By using curl-loader (who does not use the no-cache option) I noticed that indeed object was cached ! so I compared capture of both request and then I noticed the pragma option ... I spend 4 days on this default value and I want to thank you for your effort ! --- Raemaekers Mark <markraem@xxxxxxxxx> wrote: > Thanks for your input, but unfortunately it is still > not working. > > each time I launch : [curl-machine]#curl > http://omp.wc.be/home.html I get in store.log : > 1192090981.782 RELEASE 00 00000018 > CE042BF5E20CD75407DE72B1C8D0CA2C 200 1192093905 > 1192089432 -1 text/html 18/18 GET > http://omp.wc.be/home.html > 1192090981.782 SWAPOUT 00 00000019 > EFE6712C44DC67B734C8EC1E9436327C 200 1192093910 > 1192089432 -1 text/html 18/18 GET > http://omp.wc.be/home.html > > > ... and I see on the http server ther reqest coming > in, so squid is still not caching. I do not > understand > why squid RELEASES the object first and then does > SWAPOUT to disk. > > Here you see the result of curl -I > http://omp.wc.be/home.html (also same behaviour on > squid machine, meaning squid machine still contacts > http server. > [curl-machine]#curl -I http://omp.wc.be/home.html > HTTP/1.0 200 OK > Date: Thu, 11 Oct 2007 09:27:48 GMT > Server: Apache/2.0.52 (Red Hat) > Last-Modified: Thu, 11 Oct 2007 07:57:12 GMT > ETag: "99c3-12-f3228600" > Accept-Ranges: bytes > Content-Length: 18 > Content-Type: text/html; charset=UTF-8 > X-Cache: MISS from omp.wc.be > Via: 1.0 omp.wc.be:80 (squid/2.6.STABLE16) > Connection: close > > > tail -n 42 cache.log says : > [root@rack4top logs]# tail -n 42 cache.log > 2007/10/11 10:34:17| Starting Squid Cache version > 2.6.STABLE16 for i686-pc-linux-gnu... > 2007/10/11 10:34:17| Process ID 19543 > 2007/10/11 10:34:17| With 1024 file descriptors > available > 2007/10/11 10:34:17| Using epoll for the IO loop > 2007/10/11 10:34:17| Performing DNS Tests... > 2007/10/11 10:34:17| Successful DNS name lookup > tests... > 2007/10/11 10:34:17| DNS Socket created at 0.0.0.0, > port 32776, FD 5 > 2007/10/11 10:34:17| Adding nameserver 127.0.0.1 > from > squid.conf > 2007/10/11 10:34:17| Unlinkd pipe opened on FD 9 > 2007/10/11 10:34:17| Swap maxSize 102400 KB, > estimated > 7876 objects > 2007/10/11 10:34:17| Target number of buckets: 393 > 2007/10/11 10:34:17| Using 8192 Store buckets > 2007/10/11 10:34:17| Max Mem size: 51200 KB > 2007/10/11 10:34:17| Max Swap size: 102400 KB > 2007/10/11 10:34:17| Rebuilding storage in > /usr/local/squid/var/cache (CLEAN) > 2007/10/11 10:34:17| Using Least Load store dir > selection > 2007/10/11 10:34:17| Current Directory is > /usr/local/squid/var/logs > 2007/10/11 10:34:17| Loaded Icons. > 2007/10/11 10:34:17| Accepting accelerated HTTP > connections at 0.0.0.0, port 80, FD 11. > 2007/10/11 10:34:17| Accepting ICP messages at > 0.0.0.0, port 3130, FD 12. > 2007/10/11 10:34:17| Accepting SNMP messages on port > 3401, FD 13. > 2007/10/11 10:34:17| WCCP Disabled. > 2007/10/11 10:34:17| Configuring Parent > 10.10.10.3/80/0 > 2007/10/11 10:34:17| Ready to serve requests. > 2007/10/11 10:34:18| Done reading > /usr/local/squid/var/cache swaplog (1 entries) > 2007/10/11 10:34:18| Finished rebuilding storage > from > disk. > 2007/10/11 10:34:18| 1 Entries scanned > 2007/10/11 10:34:18| 0 Invalid entries. > 2007/10/11 10:34:18| 0 With invalid flags. > 2007/10/11 10:34:18| 1 Objects loaded. > 2007/10/11 10:34:18| 0 Objects expired. > 2007/10/11 10:34:18| 0 Objects cancelled. > 2007/10/11 10:34:18| 0 Duplicate URLs > purged. > 2007/10/11 10:34:18| 0 Swapfile clashes > avoided. > 2007/10/11 10:34:18| Took 0.3 seconds ( 3.8 > objects/sec). > 2007/10/11 10:34:18| Beginning Validation Procedure > 2007/10/11 10:34:18| Completed Validation > Procedure > 2007/10/11 10:34:18| Validated 1 Entries > 2007/10/11 10:34:18| store_swap_size = 4k > 2007/10/11 10:34:18| storeLateRelease: released 0 > objects > > > Very strange is that : > 1. apparantly 1 Object is loaded (and I only ask for > 1 > object) home.html and I am the only user on this > test > system. > this indicates to me that the page is cached, but > the > squid allways fetches the object from the http sever > ... > > Using following conf (using comments by Amos) ... > > #ACCELERATOR > ################### > http_port 80 accel defaultsite=omp.wc.be > cache_peer 10.10.10.3 parent 80 0 no-query > originserver name=webserver > ######ACLS############### > acl all src all > cache_peer_domain webserver omp.wc.be > acl mydomain dstdomain omp.wc.be > http_access allow mydomain > never_direct allow mydomain > http_access deny all > #CACHING RULES > ############### > acl QUERY urlpath_regex cgi-bin \? > cache deny QUERY > cache allow all > refresh_pattern . 1440 20% > 4320 > #MISCELLANIOUS > ##################3 > visible_hostname omp.wc.be > cache_effective_user squid > #cache_effective_group squid > dns_testnames omp.wc.be > dns_nameservers 127.0.0.1 > cache_mem 50 MB > [root@rack4top etc]# > > ... I allready tried the following : > 1. removeing the cache_dir (squid -k shutdown ; rm > -fr > /usr/local/squid/var/cache/* ; squid -z) and > recreating it; start squid > 2. added the dns_nameservers 127.0.0.1 statement, > bcc > otherwise I get warning at startup that there are no > DNS servers specified in /etc/resolv.conf > /etc/resolv.conf only contains "files" an I am using > /etc/hosts for dns lookup on the squid machine. > cat /etc/hosts looks like this : > 127.0.0.1 rack4top > localhost.localdomain > localhost > 13.1.1.1 omp.wc.be (13.1.1.1 is > interface where curl-machine talks to.) > 3. commented the "refresh_pattern . 1440 20% 4320" > statement and restarted squid. same behaviour (so I > uncommneted it now) > > note : I compild squid with only --snmp-enabled > option. furthermore I did NOT specify any other > options with configure. Can this be an issue ? > What am I overlooking ? > > Thanks in advance. > > > > --- Amos Jeffries <squid3@xxxxxxxxxxxxx> wrote: > > > > Dear squid-cache.org, > > > > > > I have three RHEL4 servers : > > > > > > 1. configured with squid 2.6 Version > 2.6.STABLE16 > > in > > > accelerator mode > > > 2. configured with (apache) httpd daemon > > > 3. this machine has curl installed (to generate > > http > > > requests) > > > > > > > > > Each time I do curl http://omp.wc.be/home.html, > I > > > notice that the WC ALLWAYS sends the reqeust to > > the > > > http server. It does NOT cache my home.html > page. > > > If I remove the "always_direct allow all" > === message truncated === ____________________________________________________________________________________ Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more. http://mobile.yahoo.com/go?refer=1GNXIC