<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:"Calibri",sans-serif;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FR" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoPlainText"><span lang="EN-US">Hello,<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">I’m having some difficulties understanding some errors I’m getting with squid while trying to act as a cache of a yum repository.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Squid works “mostly” fine and cache “most” of the files going through… but some won’t get into the cache and this is quite problematic for us.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">It doesn’t seem to depend on the size of the file or its name… I’m moving a problematic file and it will get cached just fine.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">And no matter how many times I “wget” the problematic file through the proxy, the file won’t get into the cache.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Config wise, I’ve tried multiple things.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">SMP / non SMP.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Rock / aufs / in memory only…<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">The machine its running on is quite beefy (200GB of ram, 48 cores) and does nothing else than running squid.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">And so far my config looks like this:<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">debug_options ALL,1 11,3 31,3 65,3 16,5 20,5 cache_mem                     1 GB maximum_object_size_in_memory 10 MB maximum_object_size           512 MB workers 3 access_log                    daemon:/var/log/squid/access.log
 squid refresh_pattern . 3600 90% 43200 override-expire ignore-no-cache ignore-no-store ignore-private ignore-must-revalidate ignore-reload acl authorized_domains dstdomain .hpc.edf.fr http_access allow authorized_domains http_access allow localhost http_port
 10.10.10.10:3142 http_port 127.0.0.1:3142 cache_dir rock /data 3000 max-size=500MB<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">And without further ado, the errors I’m getting in the logs with some of the files…<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">----------<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">HTTP/1.1 200 OK^M<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Date: Wed, 18 Nov 2020 14:25:56 GMT^M<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Server: Apache/2.4.10 (Debian)^M<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Last-Modified: Thu, 08 Oct 2020 14:54:47 GMT^M<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">ETag: "e6c-5b12a0365d88b"^M<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Accept-Ranges: bytes^M<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Content-Length: 3692^M<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Vary: Accept-Encoding^M<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Content-Type: application/xml^M<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">X-Cache: MISS from vipproxy1.mydomain^M<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">X-Cache-Lookup: MISS from vipproxy1.mydomain:3142^M<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Via: 1.1 vipproxy1.mydomain (squid/5.0.1-VCS)^M<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Connection: keep-alive^M<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">^M<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">----------<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">2020/11/18 15:25:56.616 kid3| 20,5| store.cc(814) write: storeWrite: writing 1145 bytes for '3BD6C6FADCADCACA042F71576702C21D'<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">2020/11/18 15:25:56.616 kid3| 20,3| store_swapout.cc(374) mayStartSwapOut: already allowed<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">2020/11/18 15:25:56.616 kid3| 11,3| http.cc(1087) persistentConnStatus: conn21 local=123.456.789.15:49420 remote=123.456.789.107:80 HIER_DIRECT FD 41 flags=1 eof=0<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">2020/11/18 15:25:56.616 kid3| 20,5| store.cc(814) write: storeWrite: writing 2547 bytes for '3BD6C6FADCADCACA042F71576702C21D'<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">2020/11/18 15:25:56.616 kid3| 20,3| store_swapout.cc(374) mayStartSwapOut: already allowed<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">2020/11/18 15:25:56.616 kid3| 11,3| http.cc(1087) persistentConnStatus: conn21 local=123.456.789.15:49420 remote=123.456.789.107:80 HIER_DIRECT FD 41 flags=1 eof=0<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">2020/11/18 15:25:56.616 kid3| 20,3| store.cc(1065) complete: storeComplete: '3BD6C6FADCADCACA042F71576702C21D'<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">2020/11/18 15:25:56.616 kid3| 20,3| store.cc(1258) validLength: storeEntryValidLength: Checking '3BD6C6FADCADCACA042F71576702C21D'<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">2020/11/18 15:25:56.616 kid3| 20,5| store.cc(1260) validLength: storeEntryValidLength:     object_len = 4007<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">2020/11/18 15:25:56.616 kid3| 20,5| store.cc(1261) validLength: storeEntryValidLength:         hdr_sz = 315<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">2020/11/18 15:25:56.616 kid3| 20,5| store.cc(1262) validLength: storeEntryValidLength: content_length = 3692<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">2020/11/18 15:25:56.616 kid3| 20,3| store_swapout.cc(374) mayStartSwapOut: already allowed<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">2020/11/18 15:25:56.616 kid3| 20,5| store_swapout.cc(49) storeSwapOutStart: storeSwapOutStart: Begin SwapOut 'http://repos.mydomain/repos/rpm-hpc/el8/repodata/repomd.xml' to dirno -1, fileno FFFFFFFF<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">2020/11/18 15:25:56.616 kid3| 20,3| store_swapmeta.cc(52) storeSwapMetaBuild: storeSwapMetaBuild URL:
</span><a href="http://repos.mydomain/repos/rpm-hpc/el8/repodata/repomd.xml"><span lang="EN-US">http://repos.mydomain/repos/rpm-hpc/el8/repodata/repomd.xml</span></a><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">2020/11/18 15:25:56.616 kid3| 20,2| store_io.cc(38) storeCreate: storeCreate: no swapdirs for e:tw1343=sp2V/0x559eb98619f0*4<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">2020/11/18 15:25:56.616 kid3| 20,5| Transients.cc(295) evictCached: e:tw1343=sp2V/0x559eb98619f0*4<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">2020/11/18 15:25:56.616 kid3| 20,3| store.cc(466) unlock: Client unlocking key 3BD6C6FADCADCACA042F71576702C21D e:tw1343=sp2V/0x559eb98619f0*4<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">2020/11/18 15:25:56.616 kid3| 20,3| store.cc(466) unlock: FwdState unlocking key 3BD6C6FADCADCACA042F71576702C21D e:tw1343=sp2V/0x559eb98619f0*3<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">2020/11/18 15:25:56.616 kid3| 20,3| store.cc(442) lock: store_client::copy locked key 3BD6C6FADCADCACA042F71576702C21D e:tw1343=sp2V/0x559eb98619f0*3<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">2020/11/18 15:25:56.616 kid3| 20,3| store.cc(466) unlock: store_client::copy unlocking key 3BD6C6FADCADCACA042F71576702C21D e:tw1343=sp2V/0x559eb98619f0*3<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">2020/11/18 15:25:56.616 kid3| 20,3| store_swapout.cc(347) mayStartSwapOut:  already rejected<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">2020/11/18 15:25:56.616 kid3| 20,3| store.cc(442) lock: storeUnregister locked key 3BD6C6FADCADCACA042F71576702C21D e:tw1343=sp2V/0x559eb98619f0*3<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">2020/11/18 15:25:56.616 kid3| 20,3| store.cc(466) unlock: storeUnregister unlocking key 3BD6C6FADCADCACA042F71576702C21D e:tw1343=sp2V/0x559eb98619f0*3<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">2020/11/18 15:25:56.616 kid3| 20,3| store.cc(466) unlock: clientReplyContext::removeStoreReference unlocking key 3BD6C6FADCADCACA042F71576702C21D e:tw1343=sp2V/0x559eb98619f0*2<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">2020/11/18 15:25:56.616 kid3| 20,3| store.cc(466) unlock: ClientHttpRequest::loggingEntry unlocking key 3BD6C6FADCADCACA042F71576702C21D e:tw1343=sp2V/0x559eb98619f0*1<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">2020/11/18 15:25:56.616 kid3| 20,5| store.cc(482) doAbandon: e:tw1343=sp2V/0x559eb98619f0*0 via ClientHttpRequest::loggingEntry<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">2020/11/18 15:25:56.616 kid3| 20,5| Controller.cc(654) handleIdleEntry: destroying unlocked entry: 0x559eb98619f0 e:tw1343=sp2V/0x559eb98619f0*0<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">2020/11/18 15:25:56.616 kid3| 20,3| store.cc(398) destroyStoreEntry: destroyStoreEntry: destroying 0x559eb98619f8<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">2020/11/18 15:25:56.616 kid3| 20,3| store.cc(380) destroyMemObject: 0x559eb9861a70 in e:tw1343=sp2V/0x559eb98619f0*0<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">2020/11/18 15:25:56.616 kid3| 20,5| Transients.cc(320) disconnect: e:tw1343=sp2V/0x559eb98619f0*0<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">2020/11/18 15:25:56.616 kid3| 20,3| MemObject.cc(108) ~MemObject: MemObject destructed, this=0x559eb9861a70<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">2020/11/18 15:25:56.616 kid3| 20,5| store.cc(353) ~StoreEntry: StoreEntry destructed, this=0x559eb98619f0<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">I’m running a rather recent version of squid that I recompiled from git with the “enable-http-violations” use flag.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Squid Cache: Version 5.0.1-VCS<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">Service Name: squid<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">This binary uses OpenSSL 1.1.1c FIPS  28 May 2019. For legal restrictions on distribution see
</span><a href="https://www.openssl.org/source/license.html"><span lang="EN-US">https://www.openssl.org/source/license.html</span></a><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">configure options:  '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share'
 '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--libexecdir=/usr/lib64/squid' '--datadir=/usr/share/squid' '--sysconfdir=/etc/squid'
 '--with-logdir=/var/log/squid' '--with-pidfile=/var/run/squid.pid' '--disable-dependency-tracking' '--enable-eui' '--enable-follow-x-forwarded-for' '--enable-auth' '--enable-auth-basic=DB,fake,getpwnam,LDAP,NCSA,PAM,POP3,RADIUS,SASL,SMB,SMB_LM' '--enable-auth-ntlm=SMB_LM,fake'
 '--enable-auth-digest=file,LDAP' '--enable-auth-negotiate=kerberos' '--enable-storeid-rewrite-helpers=file' '--enable-cache-digests' '--enable-cachemgr-hostname=localhost' '--enable-delay-pools' '--enable-epoll' '--enable-icap-client' '--enable-ident-lookups'
 '--enable-linux-netfilter' '--enable-removal-policies=heap,lru' '--enable-snmp' '--enable-ssl' '--enable-ssl-crtd' '--enable-storeio=aufs,diskd,ufs,rock' '--enable-diskio' '--enable-wccpv2' '--enable-esi' '--enable-ecap' '--with-aio' '--with-default-user=squid'
 '--with-dl' '--with-openssl' '--with-pthreads' '--disable-arch-native' '--disable-security-cert-validators' '--with-swapdir=/var/spool/squid' 'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu' 'CFLAGS=-O2 -g -pipe -Wall -Werror=format-security
 -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection
 -fcf-protection' 'LDFLAGS=-Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld' 'CXXFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches
 -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' 'PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig' '--enable-http-violations'<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">We have resorted to use apt-cacher-ng instead of squid for the moment as we are heavily impacted “performance wise” by this lack of caching on some of the files.<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US">If anyone has hints or suggestions of what might be the problem ?<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoPlainText">Thx,<o:p></o:p></p>
<p class="MsoPlainText">Guillaume.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>