0

Our Varnish cache is flushed every 20 minutes.

Timewise in debug.log it looks like it's a cache_invalidate like this that fullly flush the Varnish Cache every 20 minutes when group:index cron is run. Can anyone see why this should fully flush the Varnish Cache?

[2022-06-27T13:02:07.152727+00:00] main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"servers":[{"Laminas\Uri\Uri":"http://fsdfe-purge.swarm.powr.host:80/"}],"formattedTagsChunk":"((^|,)cat_p_429(,|$))|((^|,)cat_p_63668(,|$))|((^|,)cat_p_6500(,|$))|((^|,)cat_p_7098(,|$))|((^|,)cat_p_22221(,|$))|((^|,)cat_p_22224(,|$))|((^|,)cat_p_27387(,|$))|((^|,)cat_p_30317(,|$))|((^|,)cat_p_55937(,|$))|((^|,)cat_p_58449(,|$))|((^|,)cat_p_58658(,|$))|((^|,)cat_p_58659(,|$))|((^|,)cat_p_62667(,|$))|((^|,)cat_p_63798(,|$))|((^|,)cat_p_66341(,|$))|((^|,)cat_p_66511(,|$))|((^|,)cat_p_66560(,|$))|((^|,)cat_p_66572(,|$))|((^|,)cat_p_66599(,|$))|((^|,)cat_p_66600(,|$))|((^|,)cat_p_66601(,|$))|((^|,)cat_p_66607(,|$))|((^|,)cat_p_66622(,|$))|((^|,)cat_p_66658(,|$))|((^|,)cat_p_66662(,|$))|((^|,)cat_p_66691(,|$))|((^|,)cat_p_66773(,|$))|((^|,)cat_p_66775(,|$))|((^|,)cat_p_75799(,|$))|((^|,)cat_p_83155(,|$))|((^|,)cat_p_88752(,|$))|((^|,)cat_p_88802(,|$))|((^|,)cat_p_88806(,|$))|((^|,)cat_p_88811(,|$))|((^|,)cat_p_88832(,|$))|((^|,)cat_p_88833(,|$))|((^|,)cat_p_88919(,|$))|((^|,)cat_p_89557(,|$))|((^|,)cat_p_91550(,|$))|((^|,)cat_p_97691(,|$))|((^|,)cat_p_97693(,|$))|((^|,)cat_p_97725(,|$))|((^|,)cat_p_97726(,|$))|((^|,)cat_p_97727(,|$))|((^|,)cat_p_97839(,|$))|((^|,)cat_p_101152(,|$))|((^|,)cat_p_101988(,|$))|((^|,)cat_p_104958(,|$))|((^|,)cat_p_104966(,|$))|((^|,)cat_p_104980(,|$))|((^|,)cat_p_105194(,|$))|((^|,)cat_p_105195(,|$))|((^|,)cat_p_52560(,|$))|((^|,)cat_p_28892(,|$))|((^|,)cat_p_75369(,|$))|((^|,)cat_p_75371(,|$))|((^|,)cat_p_104981(,|$))|((^|,)cat_p_66618(,|$))|((^|,)cat_p_101932(,|$))|((^|,)cat_p_44740(,|$))|((^|,)cat_p_23246(,|$))|((^|,)cat_p_58562(,|$))|((^|,)cat_p_58563(,|$))|((^|,)cat_c_6(,|$))|((^|,)cat_c_73(,|$))|((^|,)cat_c_77(,|$))|((^|,)cat_c_12(,|$))|((^|,)cat_c_325(,|$))|((^|,)cat_c_518(,|$))|((^|,)cat_c_637(,|$))|((^|,)cat_c_133(,|$))|((^|,)cat_c_18(,|$))|((^|,)cat_c_115(,|$))|((^|,)cat_c_628(,|$))|((^|,)cat_c_379(,|$))|((^|,)cat_c_169(,|$))|((^|,)cat_c_382(,|$))|((^|,)cat_c_544(,|$))|((^|,)cat_c_453(,|$))|((^|,)cat_c_439(,|$))|((^|,)cat_c_641(,|$))|((^|,)cat_c_689(,|$))|((^|,)cat_c_189(,|$))|((^|,)cat_c_47(,|$))|((^|,)cat_c_462(,|$))|((^|,)cat_c_392(,|$))|((^|,)cat_c_2(,|$))|((^|,)cat_c_64(,|$))|((^|,)cat_c_256(,|$))|((^|,)cat_c_9(,|$))|((^|,)cat_c_61(,|$))|((^|,)cat_c_76(,|$))|((^|,)cat_c_339(,|$))|((^|,)cat_c_21(,|$))|((^|,)cat_c_508(,|$))|((^|,)cat_c_509(,|$))|((^|,)cat_c_514(,|$))|((^|,)cat_c_19(,|$))|((^|,)cat_c_82(,|$))|((^|,)cat_c_35(,|$))|((^|,)cat_c_103(,|$))|((^|,)cat_c_63(,|$))|((^|,)cat_c_385(,|$))|((^|,)cat_c_20(,|$))|((^|,)cat_c_72(,|$))|((^|,)cat_c_179(,|$))|((^|,)cat_c_193(,|$))|((^|,)cat_c_100(,|$))|((^|,)cat_c_500(,|$))|((^|,)cat_c_120(,|$))|((^|,)cat_c_450(,|$))|((^|,)cat_c_188(,|$))|((^|,)cat_c_244(,|$))|((^|,)cat_c_121(,|$))|((^|,)cat_c_459(,|$))|((^|,)cat_c_322(,|$))"}} [] [2022-06-27T13:02:07.159694+00:00] main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["cat_p_429","cat_p_63668","cat_p_6500","cat_p_7098","cat_p_22221","cat_p_22224","cat_p_27387","cat_p_30317","cat_p_55937","cat_p_58449","cat_p_58658","cat_p_58659","cat_p_62667","cat_p_63798","cat_p_66341","cat_p_66511","cat_p_66560","cat_p_66572","cat_p_66599","cat_p_66600","cat_p_66601","cat_p_66607","cat_p_66622","cat_p_66658","cat_p_66662","cat_p_66691","cat_p_66773","cat_p_66775","cat_p_75799","cat_p_83155","cat_p_88752","cat_p_88802","cat_p_88806","cat_p_88811","cat_p_88832","cat_p_88833","cat_p_88919","cat_p_89557","cat_p_91550","cat_p_97691","cat_p_97693","cat_p_97725","cat_p_97726","cat_p_97727","cat_p_97839","cat_p_101152","cat_p_101988","cat_p_104958","cat_p_104966","cat_p_104980","cat_p_105194","cat_p_105195","cat_p_52560","cat_p_28892","cat_p_75369","cat_p_75371","cat_p_104981","cat_p_66618","cat_p_101932","cat_p_44740","cat_p_23246","cat_p_58562","cat_p_58563","cat_c_6","cat_c_73","cat_c_77","cat_c_12","cat_c_325","cat_c_518","cat_c_637","cat_c_133","cat_c_18","cat_c_115","cat_c_628","cat_c_379","cat_c_169","cat_c_382","cat_c_544","cat_c_453","cat_c_439","cat_c_641","cat_c_689","cat_c_189","cat_c_47","cat_c_462","cat_c_392","cat_c_2","cat_c_64","cat_c_256","cat_c_9","cat_c_61","cat_c_76","cat_c_339","cat_c_21","cat_c_508","cat_c_509","cat_c_514","cat_c_19","cat_c_82","cat_c_35","cat_c_103","cat_c_63","cat_c_385","cat_c_20","cat_c_72","cat_c_179","cat_c_193","cat_c_100","cat_c_500","cat_c_120","cat_c_450","cat_c_188","cat_c_244","cat_c_121","cat_c_459","cat_c_322"],"mode":"matchingAnyTag"}} []

1 Answer 1

1

Based on the information you shared, this looks more like a Magento problem than a Varnish problem. However, if you want to be sure that the logs you shared actually correspond to the cache invalidation behavior, you can check Varnish's ban list.

Run the following command just after the cron has finished its execution:

sudo varnishadm ban.list

The output of the ban list should give a clear indication what type of objects were matched.

See https://www.varnish-software.com/developers/tutorials/ban/ for a full tutorial on banning in Varnish. And have a look at https://www.varnish-software.com/developers/tutorials/ban/#the-ban-list if you want to know more about the ban list.

Once you see the output of the ban list, you can conclude whether or not there is a mismatch. If the ban list matches the tags in the debug log, the problem is related to Magento and not to Varnish or the configuration of Varnish.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.