cache manager of nginx not clearing cache as expected

Igor A. Ippolitov iippolitov at nginx.com
Wed Jan 18 09:06:29 UTC 2017


Hello, omkar_jadhav_20

It might occur that nginx keeps files opened while serving them to slow 
clients.
You can try looking for these files with 'lsof -n /cache | grep deleted'.
In a case like this you might want to set a timeout for clients or use 
smaller files/chunks.

It looks like nginx cache manager maintains cache size around 200g as 
requested (243G in your case)
You have to ensure this is exactly cache directory which occupy whole FS.


On 18.01.2017 10:21, omkar_jadhav_20 wrote:
> Hi,
>
> we are running nginx with version 1.10 on redhat 7.2 OS. We have set
> max_seize limit for cache of particular application. But we have observed
> that cache manager is clearing the space from cache but not at desired speed
> . below are few details :
> Filesystem                    Type      Size  Used Avail Use% Mounted on
>
> /dev/mapper/vg_cache-lv_cache ext4      1.5T  1.4T  6.9M 100% /cache
>
> ------------------------------------
> du -sh /cache/12007
> 243G    12007
> --------------------
> nginx conf corresponding line :
> proxy_cache_path    /cache/12007 keys_zone=a12007:200m levels=1:2
> max_size=200g inactive=10d;
>
> ----------------
>
> In error.log we are getting continuous no space left on the device errors.
> Please advise what needs to be done to avoid these types of scenario. We are
> getting very frequent error of such types in out environment.
>
> Posted at Nginx Forum: https://forum.nginx.org/read.php?2,272036,272036#msg-272036
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx




More information about the nginx mailing list