Problem with proxy_cache_path and limit

erick3k nginx-forum at forum.nginx.org
Tue Dec 19 02:14:43 UTC 2017


nginx -v
nginx version: nginx/1.13.7

# Server globals
user                    www-data;
worker_processes        auto;
worker_rlimit_nofile    65535;
error_log               /var/log/nginx/error.log crit;
pid                     /var/run/nginx.pid;


# Worker config
events {
        worker_connections  1024;
        use                 epoll;
        multi_accept        on;
}


http {
    
	proxy_cache_path /home/admin/cachemaster levels=1:2 keys_zone=my_cache:100m
max_size=1g inactive=60m use_temp_path=off;
   
   }

server {
  listen       107.170.204.190:443;
  server_name  sf1.example www.sf1.example;
  ssl         on;
    ssl_certificate      /home/admin/conf/web/ssl.sf1.example.pem;
    ssl_certificate_key  /home/admin/conf/web/ssl.sf1.example.key;
    error_log  /var/log/apache2/domains/sf1.example.error.log error;

  location / {
    proxy_cache my_cache;
    proxy_set_header  X-Real-IP  $remote_addr;
	proxy_cache_revalidate on;
	proxy_cache_min_uses 3;
	proxy_cache_valid 200 301 7d;
    proxy_pass https://example:443;
    proxy_ignore_headers X-Accel-Expires Expires Cache-Control;
    
  }
}

but the folder /home/admin/cachemaster fills up beyond 1gb, what am i
missing

Thanks

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,277816,277816#msg-277816



More information about the nginx mailing list