cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.2.6 var/page_cache cleared RANDOMLY?

Magento 2.2.6 var/page_cache cleared RANDOMLY?

Hello all

We are using default full page cache, which works in pricipal. When visiting sites on the store, the cache-files are generated in /var/page_cache. 

But from time to time, the files are gotten wiped out and i dont have any idea why. This results in high page load times, when there is no cache available. 

 

I suspect t third-party module which is responsible for it, but i didnt find the reason for now. 

 

is there a way to debug the clean/flush of page_cache to get the victims?

TTL is set to 86400, so this is not the issue. 

 

Cache Status looks always fine:

Current status:
                        config: 1
                        layout: 1
                    block_html: 1
                   collections: 1
                    reflection: 1
                        db_ddl: 1
                           eav: 1
         customer_notification: 1
            config_integration: 1
        config_integration_api: 1
                     full_page: 1
             config_webservice: 1
                     translate: 1

I'm running the site in developer-mode.

Also we are using Cloudflare CDN, which bypass all requests. (only used for DDOS prevention)

Varnish is installed on the System, but not activated in magento configuration settings.  

 

access-control-allow-credentials: true
access-control-allow-headers: Accept,Accept-Charset,Accept-Encoding,Accept-Language,Connection,Content-Type,Cookie,DNT,Host,Keep-Alive,Origin,Referer,User-Agent,X-CSRF-Token,X-Requested-With
access-control-allow-methods: *
access-control-allow-origin: *
cache-control: no-store, no-cache, must-revalidate, max-age=0
cf-cache-status: DYNAMIC
cf-ray: 52de36f4ac063e7e-ZRH
content-encoding: br
content-type: text/html; charset=UTF-8
date: Wed, 30 Oct 2019 14:52:46 GMT
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
expires: -1
pragma: no-cache
server: cloudflare
status: 200
vary: Accept-Encoding
x-cache-tags: d5b,30f,8cc,ea2,a58,1e2,6d8,06f,744,54f,d75,824,a1a,f17,775,2f3,3e4,f87,e40,08f,151,0b9,80d,e40,384,535,9fc,c13,030,9dc,e3f,749,9b4,746,9c8,008,4f6,97a,af3,054,6a6,46f,16d,fdc
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-magento-cache-control: max-age=86401, public, s-maxage=86401
x-magento-cache-debug: MISS
x-ua-compatible: IE=edge
x-varnish-cache: MISS
x-varnish-cacheable: YES
x-varnish-ttl: 120.000
x-xss-protection: 1; mode=block

Thanks for your ideas or help

1 REPLY 1

Re: Magento 2.2.6 var/page_cache cleared RANDOMLY?

Hello Forum

 

Looks like i got some more information but no solution. I have here a file from var/page_cache folder. the first line from a cache product looks like this:

 

 

a:4:{s:4:"hash";s:0:"";s:5:"mtime";i:1572989661;s:6:"expire";i:1573076062;s:4:"tags";s:384:"f46_CAT_C,f46_CAT_C_208,f46_CAT_C_663,f46_CAT_C_322,f46_CAT_C_210,f46_CAT_C_313,f46_CAT_C_223,f46_CAT_C_214,f46_CAT_C_321,f46_CAT_C_1607,f46_CAT_C_1676,f46_STORE,f46_CMS_B,f46_CMS_B_HEADER_INFO,f46_CMS_B_FOOTER_LIST,f46_CMS_B_FOOTER_COL_2,f46_CMS_B_FOOTER_COL_3,f46_CAT_P_16027,f46_CAT_P,f46_CAT_P_3247,f46_REVIEW_BLOCK,f46_CMS_B_VORTEILE,f46_AW_SBB_BRAND_260,f46_FPC,f46_FPC,f46_MAGE";}

how i understand this:

f46_CAT_P_16027

This is the cache-tag with the product id. 

 

f46_CAT_C,f46_CAT_C_208,f46_CAT_C_663,f46_CAT_C_322, etc..

This are the tags for categories. As i understand, this means, if category 208,663,322, etc. is changed, this will clear also the page cache for this product. 

 

the product is only assigned to 1 category, so i'm not sure if this is the issue of my problem. 

 

A Question for my understanding:

- we have 2 products in same category, for example cat_C_322

- we update stock status from first product

- as a result, cache of category 322 and all product caches which contain the tag "cat_C_322" - tag, would be cleared 

 

As a result, if one product in a category is changed, all caches from all products in this category are cleared?


thanks for your help

Stefan