返回顶部

收藏

nginx 错误ngx_slab_alloc() failed: no memory in cache keys zone "nginx_uwsgi_cache"处理

更多

nginx日志中突然出现了很多下面的错误信息:

2014/12/27 15:33:59 [crit] 1883#0: ngx_slab_alloc() failed: no memory in cache keys zone "nginx_uwsgi_cache"
2014/12/27 15:34:03 [crit] 1884#0: ngx_slab_alloc() failed: no memory in cache keys zone "nginx_uwsgi_cache"
2014/12/27 15:34:05 [crit] 1884#0: ngx_slab_alloc() failed: no memory in cache keys zone "nginx_uwsgi_cache"
2014/12/27 15:34:05 [crit] 1884#0: ngx_slab_alloc() failed: no memory in cache keys zone "nginx_uwsgi_cache"
2014/12/27 15:34:06 [crit] 1881#0: ngx_slab_alloc() failed: no memory in cache keys zone "nginx_uwsgi_cache"
2014/12/27 15:34:06 [crit] 1881#0: ngx_slab_alloc() failed: no memory in cache keys zone "nginx_uwsgi_cache"

这个错误是由于nginx缓存设置的keyzone设置的值太小了

uwsgi_cache_path  /export/nginx-cache/uwsgi levels=1:2 keys_zone=nginx_uwsgi_cache:128m max_size=30g inactive=100d;

可以通过调整key_zone的内存大小来解决此问题。

标签:nginx,缓存

收藏

0人收藏

支持

0

反对

0