ngx_slab_alloc() failed: no memory in cache keys zone "zone-xyz"

Maxim Dounin mdounin at
Wed Apr 2 12:20:41 UTC 2014


On Wed, Apr 02, 2014 at 05:30:55AM -0400, jakubp wrote:

> Hi Maxim
> Let me explain the use case.
> I am using cache module to serve very large library. Some files are very
> popular but a ot of them are not popular at all though. To deal with this
> long tail I use proxy_cache_min_uses to cache only after it was requested
> several times. So what I think happens is that disk is not a limiting factor
> (at least not enough) but keys zone grows very quickly.

What currently can be used for such a use case is "inactive=" 
parameter of the proxy_cache_path directive (see  It ensures that items not 
recently requested are removed from the cache, including ones 
created with proxy_cache_min_uses.  Have you tried tuning it?

Maxim Dounin

More information about the nginx mailing list