New answers tagged

0

The short answer is yes. But the long answer is: this snippet is obsolete since Varnish 4.x, because it already does Accept-Encoding normalization internally. So removing it is best, unless you're using old Varnish like v3. From the docs: Unless returning from vcl_recv with pipe or pass, Varnish modifies req.http.Accept-Encoding: if the client ...


2

Correct, you have the following hidden in the varnish config guide on the Devdocs https://devdocs.magento.com/guides/v2.3/config-guide/varnish/config-varnish-advanced.html#health The health_check.php script is located in the pub directory. If your Magento root directory is pub, then be sure to change the path in the url parameter from /pub/...


1

Line 67 if (req.url ~ "/pub/health_check.php") { return (pass); } tells varnish not to cache this file health_check.php because it used to check your website status, varnish will request it every 5 seconds, if it gives 200 then your website is ok, if not - depending on your varnish configuration - you will get varnish 503 backend fetch ...


0

After compared with the /etc/varnish/default.vcl, I found after removing the .probe section in the backend default can solve this. Still wondering why the probe caused this backend default { .host = "127.0.0.1"; .port = "8080"; .first_byte_timeout = 600s; .probe = { .url = "/pub/health_check.php"; .timeout = 2s; ....


0

May be your catalog page doesn't update after login because it was also cached by the browser. Is it the same if you disable browser cache? (Developer Tools)


1

The result of your curl command would help? If empty try adding -I. Solution from the comments: Add any or both of the mentioned headers in your curl. curl -X PURGE -H 'X-Magento-Tags-Pattern: .*' https://www.example.com/my/link You can find what magento sets by eg. varnishlog | grep -i tags


0

We have the same issue. How did you figure, that it was this particular module that was purging the cache?


0

Magento native cache is stored on disk under var/cache. Varnish cache is a separate process with a block of allocated RAM/memory to store its cache. Since disk access (even SSD) is always slower than memory access, memory (Varnish) will always win!


0

Note that FPC will never work as intended in Magento due to the "leaves" of the data dictating what is shown or not shown, with the trunk (the "saving" code) having zero idea whether the cache needs to be purged or not. It leads to a purge of the entire FPC with every single modification of an attribute for a product, eg. stock increased, backend attribute ...


0

Finally we managed to solve this. Here is the solution for anybody has this issue. The specific category catalog page we had this issue was only with static block. No products was rendering there because of our design. So to achieve this except from removing layered from sidebar we had this on update layout xml: <referenceContainer name="columns" remove=...


0

php bin/magento setup:config:set --http-cache-hosts=127.0.0.1:6081 worked for us. BUT Varnish restart and cache flush wasn't enough. We needed to restart PHP-FPM as well


0

In Redis environment - Get Method is always comes from cache when it generated so based on that below is the solution. Please change Ajax method to POST or you can use timestamp parameter pass with GET method like &shopbyAjax=1&_=1580169600


1

Without hashing, it won't change the content, please check below, it will help sub vcl_recv { if (req.http.User-Agent ~ "iP(?:hone|od)|BlackBerry|Palm|Googlebot-Mobile|Mobile|mobile|mobi|Windows Mobile|Safari Mobile|Android|Opera (?:Mini|Mobi)") { set req.http.X-Normalized-User-Agent = "mobile"; } else if (req.http.User-Agent ~ "iPad") {...


1

the answer is what Varnish version you have installed, version 4 is very old and discontinued. magento default.vcl config is also outdated as you can see from error message saying that fetch is deprecated. you can verify it from varnish docs: https://varnish-cache.org/docs/trunk/users-guide/vcl-built-in-subs.html#vcl-hit vcl_hit Called when a cache ...


Top 50 recent answers are included