Cache keeps growing despite Max_size limit

Hi,

I’m having issues with nginx where my cache directory keeps growing
until
the hdd is full.
If anyone can give me any information on how to solve this it will be
appreciated.

nginx -V:

nginx version: nginx/1.2.1
built by gcc 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC)
TLS SNI support enabled
configure arguments: --prefix=/usr/share/nginx
–sbin-path=/usr/sbin/nginx
–conf-path=/etc/nginx/nginx.conf
–error-log-path=/var/log/nginx/error.log
–http-log-path=/var/log/nginx/access.log
–http-client-body-temp-path=/var/lib/nginx/tmp/client_body
–http-proxy-temp-path=/var/lib/nginx/tmp/proxy
–http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi
–http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi
–http-scgi-temp-path=/var/lib/nginx/tmp/scgi
–pid-path=/var/run/nginx.pid
–lock-path=/var/lock/subsys/nginx --user=nginx --group=nginx
–with-file-aio --with-ipv6 --with-http_ssl_module
–with-http_realip_module
–with-http_addition_module --with-http_sub_module
–with-http_dav_module
–with-http_flv_module --with-http_mp4_module
–with-http_gzip_static_module
–with-http_random_index_module --with-http_secure_link_module
–with-http_degradation_module --with-http_stub_status_module
–with-http_perl_module --with-mail --with-mail_ssl_module
–add-module=/root/nginx-1.2.1/ngx_slowfs_cache-1.9
–add-module=/root/nginx-1.2.1/nginx-sticky-module-1.0

nginx.conf:
user apache;

worker_processes 4;

error_log /var/log/nginx/error.log emerg;
pid /var/run/nginx.pid;

worker_rlimit_nofile 30000;

events {
worker_connections 8192;
use epoll;
multi_accept off;
}

http {
include /etc/nginx/mime.types;

    sendfile                on;

    gzip                    on;
    gzip_min_length         10;
    gzip_types              text/plain text/css image/png image/gif

image/jpeg application/x-javascript text/xml
application/xml application/xml+rss
text/javascript application/javascript;
gzip_vary on;
gzip_comp_level 9;
gzip_proxied any;
gzip_disable msie6;

    tcp_nodelay             off;

    log_format              '$remote_addr - $remote_user 

[$time_local]’
'"$request" $status $bytes_sent ’
‘"$http_referer" “$http_user_agent”
“$gzip_ratio”’;

    slowfs_cache_path       /var/cache/nginx/cache levels=1:2

keys_zone=fastcache:4096m max_size=25g;
slowfs_temp_path /var/cache/nginx/temp 1 2;

    proxy_buffer_size       128k;
    proxy_buffers           4 256k;
    proxy_busy_buffers_size 256k;

    include                 /etc/nginx/sites-enabled/*;

}

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

Hello!

On Wed, Mar 06, 2013 at 07:02:28AM -0500, jan5134 wrote:

built by gcc 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC)
–with-file-aio --with-ipv6 --with-http_ssl_module --with-http_realip_module

    multi_accept            off;

image/jpeg application/x-javascript text/xml
'"$request" $status $bytes_sent ’

    include                 /etc/nginx/sites-enabled/*;

}

As a quick test you may try switching to a proxy + proxy_cache
setup instead of slowfs_cache to see if slowfs_cache module
problem or something more general.


Maxim D.
http://nginx.org/en/donation.html

Thanks for the quick reply.

I would like to test that but i’m kind of new to nginx and also our
website
can’t have any downtime.
Any other suggestion maybe?

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,236987,236989#msg-236989

Hey,

As a quick test you may try switching to a proxy + proxy_cache
setup instead of slowfs_cache to see if slowfs_cache module
problem or something more general.

It’s a known issue with my ngx_slowfs_cache module.

Best regards,
Piotr S. < [email protected] >

Hi,

Thanks for your contribution to the nginx community Piotr and your
reply.
Do you have any suggestions on how to bypass this problem?
Any update on the module in the near future that might fix this issue?

Thanks
Jan

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,236987,237036#msg-237036

Hello!

On Wed, Mar 06, 2013 at 07:16:39AM -0500, jan5134 wrote:

Thanks for the quick reply.

I would like to test that but i’m kind of new to nginx and also our website
can’t have any downtime.
Any other suggestion maybe?

Try to reproduce the problem in a sandbox, it should help with
your downtime concerns.

I’m also not sure if Piotr S., author of the slowfs cache
module, is reading this list on a regular basis, so you may want
to CC him once you have some data to work with.


Maxim D.
http://nginx.org/en/donation.html

Thanks for that quick update Piotr.
Will start with the testing on a new server that i’ll set up and let you
know if there is anything else.

Thanks
Jan

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,236987,237065#msg-237065

Hey Jan,

Any update on the module in the near future that might fix this issue?

Latest release shouldn’t have this problem:
http://labs.frickle.com/files/ngx_slowfs_cache-1.10.tar.gz

Best regards,
Piotr S. < [email protected] >

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs