Welcome! Log In Create A New Profile

Advanced

Re: cache worker stops evicting assets

Maxim Dounin
December 15, 2016 08:50AM
Hello!

On Thu, Dec 15, 2016 at 04:38:18AM -0500, miracle.max wrote:

> Hello there! we currently have this issue when we restart nginx, the cache
> zone disk consume rise constantly until we reach the 84h after the restart,
> here nginx locks and start deleting, after 15-30m everything starts working
> as usual and the cache worker behaves as expected until we do another
> restart.
>
> Our current configuration is
>
> proxy_cache_path /var/cache/nginx/assets levels=2:2 keys_zone=assets:512m
> inactive=84h max_size=81920m use_temp_path=off
> loader_files=1000 loader_sleep=50ms
> loader_threshold=300ms;
>
> We currently have ˜2 million object consuming ˜40G.
> Could be that cache loader worker cant keep up with all those objects after
> the restart?

Inactive times are only recorded in memory and therefore are lost
on restart. As a result nothing will be deleted from cache based
on inactive time for 84 hours after a restart (note "inactive=84h"
in your configuration). Cache manager will still monitor cache
size and remove oldest items based on max_size configured, but
it doesn't look like you reach it.

After 84 hours cache manager will start removing items that were
not accessed since restart. If this implies significant load in
your setup, consider looking at manager_files, manager_sleep, and
manager_threshold parameters of the proxy_cache_path directive as
introduced in nginx 1.11.5.

--
Maxim Dounin
http://nginx.org/
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

cache worker stops evicting assets

miracle.max December 15, 2016 04:38AM

Re: cache worker stops evicting assets

Maxim Dounin December 15, 2016 08:50AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 312
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready