<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 2, 2017 at 3:51 PM, Amos Jeffries <span dir="ltr"><<a href="mailto:squid3@treenet.co.nz" target="_blank">squid3@treenet.co.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 3/02/2017 7:56 a.m., <a href="mailto:tmblue@gmail.com">tmblue@gmail.com</a> wrote:<br>
> asnani_satish wrote<br>
>> This happens when size specified in cache_mem >= cache_dir<br>
>> Example:<br>
>> cache_dir aufs /var/spool/squid 1000 32 512<br>
>> implies 1000 MB physical disk space allotted for cache in specified<br>
>> directory<br>
>> cache_mem 900 MB<br>
>> cache size to be used by squid which must be less than the size<br>
>> specified in cache_dir directive.<br>
>><br>
>> Dont forget to restart squid<br>
>><br>
>> We cannot just ignore the error because if this error keeps on occurring<br>
>> the performance of squid degrades.<br>
><br>
> Are you sure???<br>
><br>
> i'm getting this error when turning back on a squid system that I had down<br>
> (out of production for 2 days). My config does not indicate an issue that<br>
> you advise to be the cause of the error.<br>
><br>
> cache_mem 1 GB<br>
> cache_dir aufs /cache 65000 16 256<br>
><br>
> I'm not seeing any issue but the error is rampant at this point<br>
><br>
> 2017/02/02 10:58:59 kid1| /cache/07/49/003749FE<br>
> 2017/02/02 10:59:00 kid1| DiskThreadsDiskFile::openDone: (2) No such file or<br>
> directory<br>
> 2017/02/02 10:59:00 kid1| /cache/05/3E/00053EA0<br>
> 2017/02/02 10:59:00 kid1| DiskThreadsDiskFile::openDone: (2) No such file or<br>
> directory<br>
> 2017/02/02 10:59:00 kid1| /cache/0D/EB/005DEB19<br>
> 2017/02/02 10:59:00 kid1| DiskThreadsDiskFile::openDone: (2) No such file or<br>
> directory<br>
> 2017/02/02 10:59:00 kid1| /cache/02/27/0002273A<br>
><br>
<br>
Squid uses a journal file swap.state to store changes to the cache. On<br>
restart it is used to reconstruct the cache index fast. If you cause<br>
Squid to shutdown very fast (kill -9, systemd crashing it, or<br>
shutdown_lifetime too short) then it does not have time to fully update<br>
the journal entries.<br>
<br>
When it gets restarted after one of those abrupt shutdowns one of these<br>
messages (not errors!) gets logged for each entry which the journal<br>
indicates are present - but are not really there because their removal<br>
was not recorded on shutdown.<br>
<br>
NP: There are also things in the cache being orphaned then just<br>
overwritten because the journal does not record them as existing. But no<br>
messages about that because its not detected.<br>
<br>
These messages should decrease exponentially proportional to your<br>
traffics normal HIT rate. But in a very large cache like yours it still<br>
may take many hours to become noticably slower and days to disappear<br>
entirely. That is of course assuming your Squid does not have another<br>
restart event to begin the process all over again.<br>
<br>
Amos<br></blockquote><div><br></div><div>As always thanks Amos</div><div><br></div><div>These are systemctl stop squid and systemctl start squid, so nothing dramatic or nasty, should be shutting down cleanly</div><div><br></div><div>Tory </div></div></div></div>