Why did my cache turn red?

I had a problem clearing my application’s cache (page, action and snippet cache).

It seems that (according to memcached IRC and log files) the cache is flushed very often, even if the cache is not full.

I use:

Here the data is printed when stats are run using telnet.

I do not use any expires_in parameters when storing data in the cache. Instead, I use sweepers to manually cache every night.

Has anyone understood why this is happening?

+6
source share
1 answer

It looks like you ran out of memcached space:

 STAT limit_maxbytes 262144000 STAT bytes 209406773 

... turning off data from the cache when you do not want it, and statistics show that:

 STAT evictions 94777 

It looks like you set the cache size to 250 MB and you are using 80-90%.

Try increasing the cache size with the -m option.

UPDATE:

Statistics also show that your cache is manually cleared using Rails.cache.clear (sending memcached flush_all ):

 STAT cmd_flush 4317 # Original Stat Capture STAT cmd_flush 48 # New Stat Capture 

You should look for your code base for handheld caches.

+11
source

Source: https://habr.com/ru/post/895926/


All Articles