proxy_cache_path's max_size being violated/ignored

Maxim Dounin mdounin at
Tue Apr 9 23:58:01 UTC 2013


On Tue, Apr 09, 2013 at 05:24:12PM -0400, gwinans wrote:

> So, I've run without this third party cache purge module since I mentioned a
> custom build.
> The server is still chewing through disk space and IO remains pegged to the
> wall (mix of the cache loader and new cache items). The cache loader seems
> unable to keep up -- I've never seen it actually delete anything. Through
> watching strace, it's just loading items. Does it not work on the queue
> until all items are loaded?

Cache _loader_ never deletes anything.  It loads information about 
the cache from disk.  If it's running, it means that information 
about the cache wasn't yet loaded and nginx can't maintain 
configured max_size as it don't know current cache size (yet).

In contrast, cache _manager_ maintains max_size and deletes 
inactive cache items.  It will not be able to maintain max_size 
till the cache is loaded, see above.

> Is there anything I can do to try to alleviate this problem?

If you have problems with IO, most trivial solution to try is to 
reduce IO with proxy_cache_min_uses, see

Maxim Dounin

More information about the nginx mailing list