[squid-users] unexplained MISSes

Josep Borrell jborrell at central.aplitec.com
Fri Oct 10 16:00:56 UTC 2014


Hi,

I'm trying build a squid server that can cache youtube request for a school.
I'm using squid 3.4.7 compiled from source on Ubuntu server 14.04
I have a lot of request that are cached, but not served from cache and generate a TCP_MISS/200
I'm trying to figure why this requests are not served from cache.
Please find attached squid.conf and cache.log sample with debug enabled.

I hope someone can help me.

Thanks

Josep

*************************************************** access.log *******************************************************************

1412953551.775    167 192.168.1.112 TCP_MISS/200 4344 GET http://i1.ytimg.com/vi/9_iANxI-Mrc/default.jpg - ORIGINAL_DST/74.125.230.3 image/jpeg

****************************** cache.log ******************************************************************************************
----------
2014/10/10 17:05:51.772| ctx: enter level  0: 'http://ytimg.com.squid.internal/vi/9_iANxI-Mrc/default.jpg'
2014/10/10 17:05:51.773| http.cc(705) processReplyHeader: processReplyHeader: key '9F1BB8D27BED16A8B74F8995105B2941'
2014/10/10 17:05:51.773| http.cc(749) processReplyHeader: HTTP Server local=192.168.111.10:59210 remote=74.125.230.3:80 FD 65 flags=1
2014/10/10 17:05:51.773| http.cc(750) processReplyHeader: HTTP Server REPLY:
---------
HTTP/1.1 200 OK
Content-Type: image/jpeg
Last-Modified: Thu, 01 Jan 1970 00:23:21 GMT
Date: Fri, 10 Oct 2014 10:45:51 GMT
Expires: Fri, 10 Oct 2014 16:45:51 GMT
X-Content-Type-Options: nosniff
Server: sffe
Content-Length: 3861
X-XSS-Protection: 1; mode=block
Age: 15619
Cache-Control: public, max-age=21600
Alternate-Protocol: 80:quic,p=0.01

����
----------
2014/10/10 17:05:51.773| ctx: exit level  0
2014/10/10 17:05:51.773| ctx: enter level  0: 'http://ytimg.com.squid.internal/vi/9_iANxI-Mrc/default.jpg'
2014/10/10 17:05:51.773| http.cc(919) haveParsedReplyHeaders: HTTP CODE: 200
2014/10/10 17:05:51.773| refresh.cc(247) refreshCheck: refreshCheck: 'http://ytimg.com.squid.internal/vi/9_iANxI-Mrc/default.jpg'
2014/10/10 17:05:51.773| refresh.cc(262) refreshCheck: refreshCheck: Matched '^http:\/\/ytimg\.com\.squid\.internal.* 604800 80%% 4794000'
2014/10/10 17:05:51.773| refresh.cc(264) refreshCheck:  age:    15679
2014/10/10 17:05:51.773| refresh.cc(266) refreshCheck:  check_time:     Fri, 10 Oct 2014 15:06:51 GMT
2014/10/10 17:05:51.773| refresh.cc(268) refreshCheck:  entry->timestamp:       Fri, 10 Oct 2014 10:45:32 GMT
2014/10/10 17:05:51.773| refresh.cc(171) refreshStaleness: FRESH: expires 1412959532 >= check_time 1412953611
2014/10/10 17:05:51.773| refresh.cc(288) refreshCheck: Staleness = -1
2014/10/10 17:05:51.773| refresh.cc(373) refreshCheck: refreshCheck: object isn't stale..
2014/10/10 17:05:51.773| refresh.cc(375) refreshCheck: refreshCheck: returning FRESH_EXPIRES
2014/10/10 17:05:51.773| http.cc(482) cacheableReply: YES because HTTP status 200
2014/10/10 17:05:51.774| ctx: exit level  0
2014/10/10 17:05:51.774| client_side.cc(1459) sendStartOfMessage: HTTP Client local=74.125.230.3:80 remote=192.168.1.112:50084 FD 62 flags=33
2014/10/10 17:05:51.774| client_side.cc(1460) sendStartOfMessage: HTTP Client REPLY:
---------
HTTP/1.1 200 OK
Content-Type: image/jpeg
Last-Modified: Thu, 01 Jan 1970 00:23:21 GMT
Date: Fri, 10 Oct 2014 10:45:51 GMT
Expires: Fri, 10 Oct 2014 16:45:51 GMT
X-Content-Type-Options: nosniff
Server: sffe
Content-Length: 3861
X-XSS-Protection: 1; mode=block
Age: 15619
Cache-Control: public, max-age=21600
Alternate-Protocol: 80:quic,p=0.01
X-Cache: MISS from squid-v2
X-Cache-Lookup: MISS from squid-v2:3128
Via: 1.1 squid-v2 (squid/3.4.7)
Connection: keep-alive


----------


********************************************************************** squid.conf *******************************************************

# debug helper
#debug_options 84,3
#debug Refresh Calculation
#debug_options 22,3
# HTTP
#debug_options 11,3

debug_options 11,3 22,3 84,3


acl customernet src 172.16.212.154/32
acl customernet src 192.168.1.0/24


acl SSL_ports port 443
acl SSL_ports port 873  # rsync

acl Safe_ports port 80         # http
acl Safe_ports port 21         # ftp
acl Safe_ports port 443        # https
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 CONNECT method CONNECT

http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost manager
http_access deny manager
http_access allow localhost
http_access allow customernet
http_access deny all
# http_access allow all

#HTTPS (SSL) trafic interception options
always_direct allow SSL_ports
ssl_bump server-first SSL_ports
#sslproxy_cert_error deny all
#sslproxy_flags DONT_VERIFY_PEER
sslcrtd_program /usr/lib/squid3/ssl_crtd -s /var/spool/squid3_ssldb -M 4MB
sslcrtd_children 8 startup=1 idle=1

acl rewritedoms dstdomain .c.youtube.com .googlevideo.com .ytimg.com
store_id_program /usr/lib/squid3/storeid_file_rewrite /etc/squid3/storeid_rewrite
store_id_children 40 startup=10 idle=5 concurrency=0
store_id_access allow rewritedoms
store_id_access deny all


http_port 3128
http_port 8080 intercept
https_port 8081 intercept ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB cert=/etc/squid3/ssl_cert/squidcert.pem


forward_max_tries 25
cache_mem 2 GB
maximum_object_size_in_memory 25 MB
maximum_object_size 1 GB

visible_hostname squid-v2
dns_v4_first on


coredump_dir /var/spool/squid3
cache_replacement_policy heap LFUDA
cache_dir aufs /var/spool/squid3 14000 16 256

refresh_pattern ^http:\/\/video-srv\.(googlevideo|youtube)\.com\.squid\.internal.*  10080 80%  79900 override-lastmod override-expire ignore-reload ignore-must-revalidate ignore-private
refresh_pattern ^http:\/\/ytimg\.com\.squid\.internal.*  10080 80%  79900 override-lastmod override-expire ignore-reload ignore-must-revalidate ignore-private
refresh_pattern ^ftp:          1440    20%     10080
refresh_pattern ^gopher:       1440    0%      1440
refresh_pattern -i (/cgi-bin/|\?) 0    0%      0
refresh_pattern (Release|Packages(.gz)*)$      0       20%     2880
refresh_pattern .              0       20%     4320


# FortiGate interface of wccp
wccp2_router 192.168.111.1
# wccp version 2 configuration
wccp2_service standard 90
# tunneling method GRE for forward traffic
wccp2_forwarding_method gre
# tunneling method GRE for return traffic
wccp2_return_method gre
# which interface to use for WCCP (0.0.0.0 determines the interface from routing)
wccp2_address 0.0.0.0



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20141010/6899287f/attachment-0001.html>


More information about the squid-users mailing list