[squid-users] squid 2 redirects but does not cache

From: Christophe Gravier <christophe.gravier@dont-contact.us>
Date: Sun, 22 Jan 2006 15:26:05 +0100

Hello,

I am using squid as a reverse proxy between an apache2 and pound (load
balancer on 161.3.50.16:81, that means same box

My redirect configuration seems fine (It does serves me pages).

Nevertheless, I don't think squid is caching anything :
- /usr/sbin/ab sends me a low rate of service
- I have in /var/logsquid/acces.log lines as follow:

1137929073.158 349 161.3.50.16 TCP_MISS/200 24213 GET
http://161.3.50.16:81/VirtualHostBase/http/ist-guizay.univ-st-etienne.fr:80/VirtualHostRoot/Portail

- DIRECT/161.3.50.16 text/html
1137929073.512 352 161.3.50.16 TCP_MISS/200 24213 GET
http://161.3.50.16:81/VirtualHostBase/http/ist-guizay.univ-st-etienne.fr:80/VirtualHostRoot/Portail

- DIRECT/161.3.50.16 text/html
1137929073.864 349 161.3.50.16 TCP_MISS/200 24213 GET
http://161.3.50.16:81/VirtualHostBase/http/ist-guizay.univ-st-etienne.fr:80/VirtualHostRoot/Portail

- DIRECT/161.3.50.16 text/html
1137929074.218 353 161.3.50.16 TCP_MISS/200 24213 GET
http://161.3.50.16:81/VirtualHostBase/http/ist-guizay.univ-st-etienne.fr:80/VirtualHostRoot/Portail

- DIRECT/161.3.50.16 text/html
1137929074.562 341 161.3.50.16 TCP_MISS/200 24213 GET
http://161.3.50.16:81/VirtualHostBase/http/ist-guizay.univ-st-etienne.fr:80/VirtualHostRoot/Portail

- DIRECT/161.3.50.16 text/html

When making a benchmark using ab apache program.

If I got it right, TCP_MISS means it didn't find such thing in the cache
(humm, well it dies is the same URLso hasn't it cached anything ?)

At the same time, if I look at store.log while performing the ab test I
have things like:

1137929162.873 RELEASE -1 FFFFFFFF 233D2D7FEE30EF9F169798C26676A2D4 200
1137929162 -1 946684800 text/html 23709/23709 GET
http://161.3.50.16:81/VirtualHostBase/http/ist-guizay.univ-st-etienne.fr:80/VirtualHostRoot/Portail
1137929163.222 RELEASE -1 FFFFFFFF E0538F498902847CBFFB8229964A8F51 200
1137929163 -1 946684800 text/html 23709/23709 GET
http://161.3.50.16:81/VirtualHostBase/http/ist-guizay.univ-st-etienne.fr:80/VirtualHostRoot/Portail
1137929163.568 RELEASE -1 FFFFFFFF 1992BB6A813BB5C48F320F67D72D6E28 200
1137929163 -1 946684800 text/html 23709/23709 GET
http://161.3.50.16:81/VirtualHostBase/http/ist-guizay.univ-st-etienne.fr:80/VirtualHostRoot/Portail
1137929163.890 RELEASE -1 FFFFFFFF 51B3A82BD366C000B7EE63D964E962C6 200
1137929163 -1 946684800 text/html 23709/23709 GET
http://161.3.50.16:81/VirtualHostBase/http/ist-guizay.univ-st-etienne.fr:80/VirtualHostRoot/Portail
1137929164.242 RELEASE -1 FFFFFFFF 5CB7EB66709DACCEBCDF9A6FE5C48E5C 200
1137929164 -1 946684800 text/html 23709/23709 GET
http://161.3.50.16:81/VirtualHostBase/http/ist-guizay.univ-st-etienne.fr:80/VirtualHostRoot/Portail

So it says "RELEASE" ? Does it means it using the url reference to serve
the client, then releasing the data (trashing the cache each time) ?

I am using a Debian etch testing GNU/Linux server up to date with
official repository. That means Squid Cache: Version 2.5.STABLE12

Here is my squid.conf (stripped of commentaries).

http_port 79
httpd_accel_host 161.3.50.16 # adresse IP du serveur HTTP
httpd_accel_port 81 # port du serveur http
httpd_accel_with_proxy on # activer le proxy
httpd_accel_uses_host_header off # ne s'occupe pas des entetes

hierarchy_stoplist cgi-bin ?

acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_mem 300 MB
cache_swap_low 90
cache_swap_high 95
maximum_object_size_in_memory 128 KB
cache_dir ufs /var/spool/squid 500 16 256
hosts_file /etc/hosts

refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 1 50% 4320

acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl to_ist_guizay dst 161.3.50.16
acl SSL_ports port 443 563 # https, snews
acl SSL_ports port 873 # rsync
acl Safe_ports port 80 # http
acl Safe_ports port 81 # pound
acl Safe_ports port 79 # squid
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 631 # cups
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT

http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports

http_access allow localhost
http_access allow to_ist_guizay
http_access deny all

http_reply_access allow all

icp_access allow all

coredump_dir /var/spool/squid

I mean, please point me to the problem so that I can handle it (my web
site is not slow with one user, but what would happen when it'll come
into production ? :x).

Best Regards,

Christophe

-- 
Christophe Gravier
Laboratoire DIOM, groupe SATIn - Doctorant
ISTASE - Ingénieur d'études
Perso: http://perso.univ-st-etienne.fr/gravchri/
SATIn: http://www.istase.com/satin
Tel : 04 7748 5034
A mediter: http://www.fsffrance.org/news/article2005-11-25.fr.html
Received on Sun Jan 22 2006 - 07:26:01 MST

This archive was generated by hypermail pre-2.1.9 : Wed Feb 01 2006 - 12:00:01 MST