Nginxcaching非托pipe增长

我们有两个具有独立本地caching的Nginx服务器用于caching图像。 周期性地存在caching大小的非托pipe增长问题。 这个大小可能比nginx.conf max_size大得多。 结果caching占用所有可用磁盘空间。

我想了解这个问题的原因可能是什么。

代理cachingconfiguration( nginx.conf ):

 proxy_cache_path /opt2/nginx-cache-images1 max_size=150g levels=2:2 keys_zone=images1:1024m inactive=24h; proxy_temp_path /opt2/proxy_temp 1 2; 

/opt2/nginx-cache-images1大小约为200GB。

configuration网站位置:

 location / { proxy_set_header Host $host; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Is-Referer-Search-Engine $is_referer_search_engine; proxy_hide_header Set-Cookie; proxy_hide_header Content-Disposition; proxy_pass http://ua-image-proxy; default_type image/jpeg; proxy_cache images1; proxy_cache_key ua$request_uri$is_referer_search_engine; proxy_cache_valid 200 24h; proxy_cache_valid 301 24h; proxy_cache_valid 404 1h; } 

Nginx版本:1.7.7和1.7.9。 它是在Ubuntu 14.04上编译的。

这里同样的问题。 使用Nginx 1.8.0。

  proxy_cache_path / var / cache / nginx levels = 2:2 keys_zone = STATIC:100m inactive = 4h max_size = 512m;

 #du -hs / var / cache / nginx /
 838M / var / cache / nginx /

Maby解决方法是安装单独的磁盘caching文件夹,所以它不会填充系统磁盘100%..?

对我来说,这是固定在nginx 1.13.1 :

解决方法:现在,当基于“max_size”参数清除caching时,cachingpipe理器将忽略长时间locking的caching条目。