Nginx proxy cache purge process does not clean up items fast enough for new elements

Hung Nguyen hungnv at opensource.com.vn
Wed Oct 16 13:56:17 UTC 2019


Hello,

I Dont think the way you currently use nginx as cache proxy is best practice.

Serving large file then store whole file into cache with large number of request is like burning your disk, even if nginx cache manager can delete and refill cache fast enough, it will keep write/delete file infinitely.

Another option should be using nginx slice module, and serving large file using range request. Nginx cache will then work far better. 

--
Hưng

> On Oct 16, 2019, at 20:44, sachin.shetty at gmail.com <nginx-forum at forum.nginx.org> wrote:
> 
> Thankyou Maxim, is there anyway I can make the cache manager a bit more
> aggressive in prune and purge? We already leave 20%  of space free on the
> disks, but the concurrent request rate for large files can be huge and we
> still run in to this issue. 
> 
> What are your thoughts about disabling buffering on such issues? This is not
> a fatal error, so we should stop buffering and switch to streaming mode and
> let the request succeed with a error log line in error.log. 
> 
> Thanks again for your help on this.
> 
> Posted at Nginx Forum: https://forum.nginx.org/read.php?2,285896,285900#msg-285900
> 
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx


More information about the nginx mailing list