Re: [squid-users] exceeding cache_dir size

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Thu, 10 Jan 2013 14:30:14 +1300

On 10/01/2013 10:56 a.m., Mike Mitchell wrote:
> I'm having problems with squid 3.2.5 exceeding the cache_dir size.
> I have a 5 GB disk partition with nothing else on it, with a cache_dir
> size of 3800 MB:
>
> cache_dir aufs /cache/squid/aufs 3800 15 253
> maximum_object_size 131072 KB
>
> Today I found squid had terminated and the /cache partition was
> 100% full.
>
> After a little investigation in the cache directory I found this file:
> # ls -l 02/8C/00027F4A
> -rw-r----- 1 nobody nobody 915697664 Jan 8 21:15 02/8C/00027F4A
>
> Very strange, a 900 MB file stored when I have a maximum_object_size of 128 MB.
>
> Here's the header of the file, with the initial binary data stripped out:
>
> http://152.2.63.23/WUNC HTTP/1.0 200 OK
> Content-Type: application/x-mms-framed
> Server: Cougar/9.00.00.3372
> Date: Tue, 08 Jan 2013 10:14:18 GMT
> Pragma: no-cache, client-id=3433994619, xResetStrm=1, features="broadcast", timeout=60000, AccelBW=3500000, AccelDuration=20000, Speed=1.000
> Cache-Control: no-cache
> Last-Modified: Tue, 08 Jan 2013 10:14:18 GMT
> Supported: com.microsoft.wm.srvppair, com.microsoft.wm.sswitch, com.microsoft.wm.predstrm, com.microsoft.wm.fastcache
>
> It is a streaming audio of a local radio station.
>
> I'm guessing that since there isn't a content-length header squid will store
> the data until it all arrives, then flush it from disk later on. This is a problem
> because my swap.state files are on the same partition. When squid
> can no longer write to swap.state because of the full disk, it terminates.

yes. As you can see there is no size mentioned, so Squid will start
saving it to disk.

The fact that it went past the global maximum size is a bug though. It
should have stopped saving and scheduled the cache file for erasure when
it hit the max size. This may be related to
http://bugs.squid-cache.org/show_bug.cgi?id=3686 does the patch there
help at all?

Amos
Received on Thu Jan 10 2013 - 01:30:25 MST

This archive was generated by hypermail 2.2.0 : Thu Jan 10 2013 - 12:00:03 MST