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

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


Hello!

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 
http://nginx.org/r/proxy_cache_path).  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
http://nginx.org/



More information about the nginx mailing list