nexcess / magento-turpentine

A Varnish extension for Magento.
GNU General Public License v2.0
519 stars 253 forks source link

ESI processing not enabled #68

Closed danielrona closed 11 years ago

danielrona commented 11 years ago

Hello,

I'm running Magento CE 1.7.0.2 with Varnish 2.1.3 and the latest turpentine from Magento Connect on a debian 2.6.32 kernel

As soon as I turn on the ESI Blocks in Cache Management I get the well known ESI processing not enabled error.

The following headers are returned with debug enabled.

Age 45 Connection keep-alive Content-Encoding gzip Content-Length 6571 Content-Type text/html; charset=UTF-8 Date Thu, 21 Feb 2013 08:23:55 GMT Server Apache Via 1.1 varnish X-Turpentine-Cache 1 X-Turpentine-Esi 1 X-Varnish 1837777343 1837777340 X-Varnish-Hits 1

The HTML Sourcecode in the Browser looks as follows.

<esi:remove>ESI processing not enabled</esi:remove>
<!--esi <esi:include src="link_to_esi_url" /> -->

The Link to the ESI Url is working and does actually return content with the following headers

Age 0 Connection keep-alive Content-Length 9826 Content-Type text/html; charset=UTF-8 Date Thu, 21 Feb 2013 08:30:04 GMT Server Apache Via 1.1 varnish X-Turpentine-Cache 0 X-Turpentine-Esi 0 X-Varnish 1837777363 X-Varnish-Hits 0

I've purged all caches, tried to disable all types except Varnish ones, I still get that error there no other addons enabled that should conflict with turpentine.

Maybe you have any idea what I'm missing.

aheadley commented 11 years ago

Can you try doing a request directly to the backend with curl and send me the response headers:

$ curl -svv -H 'X-Turpentine-Secret-Handshake: 1' 'http://example.com/'

Then find one of the ESI blocks inside that and do a request (directly to the backend) to ESI include URL as well and send me the response headers and whether the response body is the expected HTML output or the ESI include block again.

danielrona commented 11 years ago

Sorry for the late reply here the return infos.

Headers

* About to connect() to DNS_NAME port 80 (#0)
*   Trying IP_ADDR... connected
* Connected to DNS_NAME (IP_ADDR) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.15 libssh2/1.2.6
> Host: DNS_NAME
> Accept: */*
> X-Turpentine-Secret-Handshake: 1
>
< HTTP/1.1 200 OK
< Date: Mon, 25 Feb 2013 10:57:47 GMT
< Server: Apache
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
< Pragma: no-cache
< X-Turpentine-Cache: 1
< X-Turpentine-Esi: 1
< Set-Cookie: frontend=6f159d081af13d33d59a0950824c5a32; path=/; domain=DNS_NAME; HttpOnly
< Cache-Control: private, no-cache, no-store, proxy-revalidate, no-transform
< Pragma: no-cache
< Vary: Accept-Encoding
< Transfer-Encoding: chunked
< Content-Type: text/html; charset=UTF-8
<
{ [data not shown]
* Connection #0 to host DNS_NAME left intact
* Closing connection #0

And here to the ESI Block

* About to connect() to DNS_NAME port 80 (#0)
*   Trying IP_ADDR... connected
* Connected to DNS_NAME (IP_ADDR) port 80 (#0)
> GET /turpentine/esi/getBlock/method/ajax/access/private/ttl/0/data/8uGa.Ol6g9k0XuxDH42fEr0DTp5vDj4t70FQlhrkdEo-vbGmOW5uxAt-MRrAkpTFoYhX5gzW9on5bWHbz47jrcLMYkLKw.LEi7p9jGnj.6exalfigoBx6bgk6aqGDlrYIKz0mzzY.o61RQLejG39c4dKf8wvUePgPjcJCv2-XVu9z4A-2oqSeXNcBlQWAK417N3UX7oh4-kHI7MsNBtFF1aT3qw7ApG7zbxAx-zAzHNpCIqT7q7px4fIxEE4EtKmXrj0-GkfgkBE.mghbtyRajyBNIjOrVGTabQZiIvgF6I=/ HTTP/1.1
> User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.15 libssh2/1.2.6
> Host: DNS_NAME
> Accept: */*
> X-Turpentine-Secret-Handshake: 1
>
< HTTP/1.1 200 OK
< Date: Mon, 25 Feb 2013 10:58:18 GMT
< Server: Apache
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
< Pragma: no-cache
< Access-Control-Allow-Origin: http://DNS_NAME
< X-Turpentine-Cache: 0
< X-Turpentine-Esi: 0
< Set-Cookie: frontend=d2b9d9073cb99d4e353930624ac4ea9a; path=/; domain=DNS_NAME; HttpOnly
< Cache-Control: private, no-cache, no-store, proxy-revalidate, no-transform
< Pragma: no-cache
< Vary: Accept-Encoding
< Transfer-Encoding: chunked
< Content-Type: text/html; charset=UTF-8
<
{ [data not shown]
* Connection #0 to host DNS_NAME left intact
* Closing connection #0
aheadley commented 11 years ago

For the ESI block, it looks like you did the request for an AJAX block (likely the messages or _globalmessages blocks). Are those returning the "ESI processing not enabled" message? If not, can you re-try the ESI block request with one that is? Also, when you do, can you tell me about the actual content you get back, is it the HTML of the block as expected or is it the ESI injected content (with the esi:include tag and such)?

danielrona commented 11 years ago

Sorry took the first ESI URL I found

Here the Header ESI Block

* About to connect() to DNS_NAME port 80 (#0)
*   Trying IP_ADDR... connected
* Connected to DNS_NAME (IP_ADDR) port 80 (#0)
> GET /turpentine/esi/getBlock/method/esi/access/private/ttl/0/data/h7cdLkhgoDJOZm3ZaMX2z.Fc6-dTSvB9MPqKmx1eGMjIHKPUwGaUGPIocx3W8R6jS9D78yUYzKhp66wMI2wn0SU9uIydxLuuBA0f-npKoicy50D.V2qkCBy0eIMDf9K42RCsLCQ3DvfK7h2nq5MXQHwqF9.1IZjblpYT.W-ihqASq18x-3WSOe8ugF4s4uenoozxwDBan-6iZP.Rg2oy3M1kqGMUfKeANFN1tkOZjCJQZ4qbQJiFE-XLERowaW.YuQUsZEEV.suKdkA8RLWotDhvsmyl-LATnKRWJTowobUOg.WrfZhfBQ==/ HTTP/1.1
> User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.15 libssh2/1.2.6
> Host: DNS_NAME
> Accept: */*
> X-Turpentine-Secret-Handshake: 1
>
< HTTP/1.1 200 OK
< Date: Tue, 26 Feb 2013 08:39:57 GMT
< Server: Apache
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
< Pragma: no-cache
< X-Turpentine-Cache: 0
< X-Turpentine-Esi: 0
< Set-Cookie: frontend=c9d36e991425b8be1069d2d0fdccd2c4; path=/; domain=DNS_NAME; HttpOnly
< Cache-Control: private, no-cache, no-store, proxy-revalidate, no-transform
< Pragma: no-cache
< Vary: Accept-Encoding
< Transfer-Encoding: chunked
< Content-Type: text/html; charset=UTF-8
<
{ [data not shown]
* Connection #0 to host DNS_NAME left intact
* Closing connection #0

this is the data returned on the ESI URL when accessed via curl

<div class="header-container">
    <div class="header">
                <h1 class="logo"><strong>Webshop</strong><a href="http://DNS_NAME/" title="Webshop" class="logo"><img src="http://DNS_NAME/skin/frontend/def$
                <p class="top-promo" title="Versandkostenfreier Versand auf Bestellungen über 50â¬">Versandkostenfreier Versand auf Bestellungen über 50â¬</p>
        <div class="nav-container">
    <ul id="nav">
        <li  class="level0 nav-1 first level-top parent"><a href="http://DNS_NAME/schulranzen-einschulung.html"  class="level-top" ><span>Schulranzen Einschulung</span></a><ul class="level0"><li  cl$
</div>
    </div>
    <div class="quick-access">
                <p class="welcome-msg">Herzlich willkommen</p>
        <ul class="links">
                        <li class="first" ><a href="http://DNS_NAME/customer/account/" title="Mein Benutzerkonto" >Mein Benutzerkonto</a></li>
                                <li ><a href="http://DNS_NAME/wishlist/" title="Mein Wunschzettel" >Mein Wunschzettel</a></li>
                                <li ><a href="http://DNS_NAME/checkout/cart/" title="Mein Warenkorb" class="top-link-cart">Mein Warenkorb</a></li>
                                <li ><a href="http://DNS_NAME/checkout/" title="Zur Kasse" class="top-link-checkout">Zur Kasse</a></li>
                                <li class=" last" ><a href="http://DNS_NAME/customer/account/login/" title="Anmelden" >Anmelden</a></li>
            </ul>
    </div>
    <div class="top-bar"><form id="search_mini_form" action="http://DNS_NAME/catalogsearch/result/" method="get">
    <div class="form-search">
        <label for="search">Suche</label>
        <input id="search" type="text" name="q" value="" class="input-text" maxlength="128" />
        <button type="submit" title="Los" class="button"><span><span>Los</span></span></button>
        <div id="search_autocomplete" class="search-autocomplete"></div>
        <script type="text/javascript">
        //<![CDATA[
            var searchForm = new Varien.searchForm('search_mini_form', 'search', 'Gesamten Shop durchsuchen...');
            searchForm.initAutocomplete('http://DNS_NAME/catalogsearch/ajax/suggest/', 'search_autocomplete');
        //]]>
        </script>
    </div>
</form></div>    </div>

I did those reqeusts directly to the backend again not via varnish.

aheadley commented 11 years ago

Ok, this is very odd. The responses all look like they should work. I don't think it's related to the issue but it looks like the ESI TTL is set to 0 somehow (see the /ttl/0/ in the ESI URL), Varnish 2.1 should ignore that and just use the default TTL. Can you post your VCL on gist.github.com and link it here? You can get the VCL Varnish is currently using with:

varnishadm vcl.show "$(varnishadm vcl.list | grep active | awk '{print $3}')"
danielrona commented 11 years ago

https://gist.github.com/schadowfox/3a4850025612e8a01332

aheadley commented 11 years ago

I'm not sure this will fix it, it's really just a hunch. In the VCL template (version-2.vcl) can you change req to bereq in vcl_pipe, then apply the VCL and do a full cache flush? For reference, this is what it should look like after the changes:

sub vcl_pipe {
    # since we're not going to do any stuff to the response we pretend the
    # request didn't pass through Varnish
    remove bereq.http.X-Turpentine-Secret-Handshake;
    set bereq.http.Connection = "close";
    return (pipe);
}
gbillingsley commented 11 years ago

I'm not sure this helps at all, but I have encountered the same issue, but I have NewRelic monitoring my server. Here is the error NewRelic has captured:

/turpentine/esi/getBlock raised
Error: Call to a member function getEvent() on a non-object

Sample stack trace
&hellip;7053215/app/code/core/Enterprise/CatalogEvent/Block/Catalog/Category/Event.php (42)
in Enterprise_CatalogEvent_Block_Catalog_Category_Event::getEvent called at /var/magento/releases/20130227053215/app/design/frontend/egoragroup/default/template/catalogevent/catalog/category/event.phtml (33)
&hellip;ude called at /var/magento/shared/var/ait_rewrite/Mage_Core_Block_Template.php (412)
&hellip;iew called at /var/magento/shared/var/ait_rewrite/Mage_Core_Block_Template.php (274)
&hellip;iew called at /var/magento/shared/var/ait_rewrite/Mage_Core_Block_Template.php (288)
&hellip;tml called at /var/magento/shared/var/ait_rewrite/Mage_Core_Block_Abstract.php (865)
&hellip;tml called at /var/magento/shared/var/ait_rewrite/Mage_Core_Block_Abstract.php (584)
&hellip;tml called at /var/magento/shared/var/ait_rewrite/Mage_Core_Block_Abstract.php (524)
&hellip;magento/releases/20130227053215/app/code/core/Mage/Page/Block/Html/Wrapper.php (52)
&hellip;tml called at /var/magento/shared/var/ait_rewrite/Mage_Core_Block_Abstract.php (865)
&hellip;tml called at /var/magento/shared/var/ait_rewrite/Mage_Core_Block_Abstract.php (584)
&hellip;tml called at /var/magento/shared/var/ait_rewrite/Mage_Core_Block_Abstract.php (528)
in Aitoc_Aitsys_Model_Rewriter_Mage_Core_Block_Abstract::getChildHtml called at /var/magento/releases/20130227053215/app/design/frontend/egoragroup/saferacer/template/page/html/header.phtml (28)
&hellip;ude called at /var/magento/shared/var/ait_rewrite/Mage_Core_Block_Template.php (412)
&hellip;iew called at /var/magento/shared/var/ait_rewrite/Mage_Core_Block_Template.php (274)
&hellip;iew called at /var/magento/shared/var/ait_rewrite/Mage_Core_Block_Template.php (288)
&hellip;tml called at /var/magento/shared/var/ait_rewrite/Mage_Core_Block_Abstract.php (865)
&hellip;7053215/app/code/community/Nexcessnet/Turpentine/controllers/EsiController.php (73)
&hellip;o/releases/20130227053215/app/code/core/Mage/Core/Controller/Varien/Action.php (419)
&hellip;s/20130227053215/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php (250)
&hellip;to/releases/20130227053215/app/code/core/Mage/Core/Controller/Varien/Front.php (176)
&hellip; at /var/magento/releases/20130227053215/app/code/core/Mage/Core/Model/App.php (354)
&hellip;ore_Model_App::run called at /var/magento/releases/20130227053215/app/Mage.php (683)
in Mage::run called at /var/magento/releases/20130227053215/index.php (87)

url request parameters: /turpentine/esi/getBlock/method/esi/access/private/ttl/3600/data/dHX3XqQ.Hjz4mGI-uYbr6pBHL.MlyPFamJUfPRPwRptCVvcxiJ4jzUw34-cxF3OV7aalWtYS59JHxbuPHIZ6vVh8ouETOWPaU3i1vQgcLv-byF-rLFJHwHreXXq9XI9LFikFVc0hz58YsgtRoUHaZzeOZeBYOj0azRVUHAOWTipxPQDSjWHYm4V-r2Lc-PXDwVL7IxlUsCr2PlBIyMGL7.yRAZn67ZvBdKj1QAVnB7ZDjcWh4TCAWXlrA.KyryDirrugcPMb.43525VeiK5tl3gTFj78VNREAw0y8BUUI8mxvnjBc.6UkzoyrhmU7omq-qplOji9QPbSQZaS7rMxxw==/

Here's a screen shot of it. Screen Shot 2013-02-27 at 12 35 50 AM

There was also an error report generated in the footer. Here is the contents of the report:

a:5:{i:0;s:162:"Invalid method Mage_Cms_Block_Block::addLink(Array
(
    [0] => Site Map
    [1] => http://www.saferacer.com/catalog/seo_sitemap/category/
    [2] => Site Map
)
)";i:1;s:1710:"#0 [internal function]: Varien_Object->__call('addLink', Array)
#1 [internal function]: Mage_Cms_Block_Block->addLink('Site Map', 'http://www.safe...', 'Site Map')
#2 /var/magento/releases/20130227053215/app/code/core/Mage/Core/Model/Layout.php(348): call_user_func_array(Array, Array)
#3 /var/magento/releases/20130227053215/app/code/core/Mage/Core/Model/Layout.php(214): Mage_Core_Model_Layout->_generateAction(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#4 /var/magento/releases/20130227053215/app/code/community/Nexcessnet/Turpentine/controllers/EsiController.php(144): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#5 /var/magento/releases/20130227053215/app/code/community/Nexcessnet/Turpentine/controllers/EsiController.php(70): Nexcessnet_Turpentine_EsiController->_getEsiBlock(Object(Varien_Object))
#6 /var/magento/releases/20130227053215/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Nexcessnet_Turpentine_EsiController->getBlockAction()
#7 /var/magento/releases/20130227053215/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('getBlock')
#8 /var/magento/releases/20130227053215/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#9 /var/magento/releases/20130227053215/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#10 /var/magento/releases/20130227053215/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#11 /var/magento/releases/20130227053215/index.php(87): Mage::run('saferacer', 'website')
#12 {main}";s:3:"url";s:365:"/turpentine/esi/getBlock/method/esi/access/public/ttl/3600/data/g4IarBscPBtGqJEuqOEt7PVrk2q5KvTHmwIu4BDk67hs71bmjLFuAb5omdzqeJvYOn1VnXZaeLyoICOP0GX0QOsrxp9dXW8h2E8I7e6Zyl3a4NyOJWEdVOx17.DkpWBhUHrhxvtZZidI.Z4naGp6txn2886muZ8w-0WLB9.j1gJ.X3aIJREKGULGTKzvhTDb31TmTRV-kwTuLrm3jSbo29irbByejSgz1et8NKj8zoHjSP84fYsgW1rQpNJWaHiEb5DBVTz05pf2GRPLoqxZdhtywby0J7q4Sci6qaJYnqg=/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:10:"sr_english";}

Again, sorry if this is information overload. I hope it helps.

danielrona commented 11 years ago

Applied config, flushed Caches still same issues :(

If I disable the ESI Blocks

     Varnish ESI Blocks  ESI blocks cached in Varnish (this should not be disabled except for debugging)

Is there any drawback?

aheadley commented 11 years ago

@gbillingsley These are different issues.

Sample stack trace

This is caused by a missing registry_key for the header block. It's not included out of the box because it makes the header cached per-category and is an EE only feature (and not turned on by default I believe). You can fix it by adding to the header ESI policy:

<registry_keys>
    <current_category/>
</registry_keys>

There was also an error report generated in the footer. Here is the contents of the report:

I'm not sure, but I think the footer block is trying to modify another block here. You'll probably need to use the dummy_blocks param for the ESI policy but please open a separate issue and we can work on that.

aheadley commented 11 years ago

@schadowfox Yes, as it says it should only be disabled for debugging (I will probably remove it at some point because it only seems to cause confusion). Disabling it will prevent ESI injection so Varnish will only be caching full pages and visitors will see cart info and such for other visitors.

When you opened the ticket, you stated:

there no other addons enabled that should conflict with turpentine

So there are other addons you have installed though? Can you list what they are? Everything you've sent so far indicates that everything should be working fine so I'm just looking for anything that might point us in the right direction.

danielrona commented 11 years ago

There other addons installed but none should impact caching.

Here the list

Interface_Adminhtml_Default 1.7.0.1 (stable)        Default interface for Adminhtml
Interface_Frontend_Base_Default 1.7.0.1 (stable)        This is a Magento themes base
Interface_Frontend_Default  1.7.0.0 (stable)        Default interface for Frontend
Interface_Install_Default   1.7.0.0 (stable)        Default interface for Install
Lib_Google_Checkout 1.5.0.0 (stable)        Google Checkout Library
Lib_Js_Calendar 1.51.1.1 (stable)       Javascript Calendar for Magento
Lib_Js_Ext  1.7.0.0 (stable)        Extjs Javascript Libraries for Magento
Lib_Js_Mage 1.7.0.1 (stable)        Javascript Libraries for Magento
Lib_Js_Prototype    1.7.0.0.3 (stable)      Prototype and Scriptaculous Javascript Libraries for Magento
Lib_Js_TinyMCE  3.4.7.0 (stable)        TinyMCE Javascript Libraries for Magento
Lib_LinLibertineFont    2.8.14.1 (stable)       Libertine Open Fonts Project fonts for PDF print-outs
Lib_Mage    1.7.0.1 (stable)        Mage Library
Lib_Phpseclib   1.5.0.0 (stable)        Phpseclib Library
Lib_Varien  1.7.0.0 (stable)        Varien Library
Lib_ZF  1.11.1.0 (stable)       Zend Framework
Lib_ZF_Locale   1.11.1.0 (stable)       Zend Framework Locale
Mage_All_Latest 1.7.0.2 (stable)        Metapackage for latest Magento 1.7.0.2 release
Mage_Centinel   1.7.0.0 (stable)        3D Secure Card Validation
Mage_Compiler   1.7.0.0 (stable)        This module compiles all files of a Magento installation and creates a single include path to increase performance
Mage_Core_Adminhtml 1.7.0.1 (stable)        Magento Administration Panel
Mage_Core_Modules   1.7.0.2 (stable)        Collection of Magento Core Modules
Mage_Downloader 1.7.0.1 (stable)        Magento Downloader
Mage_Locale_en_US   1.7.0.1 (stable)        en_US locale
Phoenix_Moneybookers    1.3.1 (stable)      Moneybookers payment gateway integration
BankPayment 1.1.0 (stable)      Bank prepayment module which notifies the buyer to which bank account he has to transfer the money.
symmetrics_trustedrating    0.2.2 (stable)      Trusted rating.
trusted_shops_buyer_protection  0.4.22 (stable)         Implementation of the Trusted Shops Buyer Protection
Locale_Mage_community_de_DE 1.7.0.0.2 (stable)      Deutsches Sprachpaket - bitte Infos auf der Extension Homepage beachten.
BillSAFE_2  12.08.16 (stable)       More revenue without risk. With BillSAFE
Mana_Filters    12.12.21.19 (stable)        Advanced layered navigation
Flagbit_ChangeAttributeSet  2.0.0 (stable)      In Magento every product has a fixed attibute set. This module enables you to switch it.
Magento_Mobile  1.7.0.1.23.1 (stable)       Magento Mobile Xml Interface
Magazento_Homesellers   1.0.4 (stable)      Organize home page in few clicks. Show best sellers,popular,new,most rated products and product reviews.
Semantium_MSemanticBasic    1.2.6.5 (stable)        This extension puts your store on track to grasp the advantages of the semantic web / linked data movement. Based on the GoodRelations ontology, your store gets semantic markup that leverages SEO performance instantly.
gtspeed_by_gossamer_threads 1.0.7 (stable)      Speed up your Magento site by minifiying, adding expires headers and optimizing images with this plugin!
m2epro_ebay_magento 4.2.8 (stable)      
The M2E Pro extension fully integrates Magento into eBay and Amazon platform. This allows quick and simple creation as well as management of product listings (inc. automated synchronization of stock levels, pricing, and product details), import of eBay and Amazon order, automated feedback posting for buyers and many other tasks which significantly reduce time required for listing maintenance.

The extension interacts with all 23 major eBay and 7 Amazon marketplaces. It supports multiple eBay/Amazon accounts and multiple Magento stores.

Lanot_EasySticker   3.0.3.3 (stable)        Adds several stickers to any product. Admin can configs display options and upload different images.
market_ready_germany    2.1.40 (stable)         Market Ready Germany
Mage_Payone 3.1.2 (stable)      PAYONE FinanceGate payment gateway for all german online and offline payment methods including PayPal, all major Credit Cards and Maestro.
symmetrics_cashticket   0.1.14 (stable)         Payment Gateway Cash-Ticket
Flagbit_Factfinder  3.3.12 (stable)         Integrates the FACT-Finder for improved product search functionality.
Nexcessnet_Turpentine   0.4.0 (beta)        Improves Magento support for Varnish caching and generates 2.1 and 3.0 compatible VCLs.

apc and memcached are turned off (had them running before installing varnish)

gbillingsley commented 11 years ago

Thanks for the help (above). I resolved both issues. On the second one, I had unset the footer_links block and then recreated it with a different footer_links block. Turpentine didn't like that, so I renamed my new one to new_footer_links and it started working. I do have another issue, though, but I'll add a new issue for it. Thanks!

aheadley commented 11 years ago

@schadowfox Looks like you're right, I don't think any of those would cause any problems. Do you get any errors in Magento's logs on pages with the "ESI processing not enabled" message?

danielrona commented 11 years ago

2013-03-04T11:45:22+00:00 DEBUG (7): Cleared Varnish ESI cache for client: 54e9c27bcf22b97bacad7729afc6d780
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: root
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: head
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: head.calendar
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: global_notices
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: header
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: menu
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: notifications
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: notification_baseurl
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: cache_notifications
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: notification_survey
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: notification_security
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: notification_toolbar
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: notification_window
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: index_notifications
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: left
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: adminhtml.system.config.switcher
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: left.child1
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: messages
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: content
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: billsafe_paymentfeecheck
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: payone.config.tooltip
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: moneybookers_jsinit
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: trustedrating_documentationlink
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: content.child4
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: ANONYMOUS_32.child0
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: formkey
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: ANONYMOUS_32.child1
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: ANONYMOUS_32.child1.child0
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: footer
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: js
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: js.child0
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: js.child1
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: js.child2
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: profiler
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: before_body_end
2013-03-04T11:45:23+00:00 DEBUG (7): Checking ESI block candidate: m_core_singletons
2013-03-04T11:45:27+00:00 DEBUG (7): Checking ESI block candidate: root
2013-03-04T11:45:27+00:00 DEBUG (7): Checking ESI block candidate: head
2013-03-04T11:45:27+00:00 DEBUG (7): Checking ESI block candidate: optional_zip_countries
2013-03-04T11:45:27+00:00 DEBUG (7): Checking ESI block candidate: tweaksgerman.version
2013-03-04T11:45:27+00:00 DEBUG (7): Checking ESI block candidate: after_body_start
2013-03-04T11:45:27+00:00 DEBUG (7): Checking ESI block candidate: google_analytics
2013-03-04T11:45:27+00:00 DEBUG (7): Checking ESI block candidate: global_notices
2013-03-04T11:45:27+00:00 DEBUG (7): Checking ESI block candidate: header
2013-03-04T11:45:27+00:00 DEBUG (7): Checking ESI block candidate: global_messages
2013-03-04T11:45:27+00:00 DEBUG (7): Checking ESI block candidate: content
2013-03-04T11:45:27+00:00 DEBUG (7): Checking ESI block candidate: magazento_homepage
2013-03-04T11:45:27+00:00 DEBUG (7): Checking ESI block candidate: page_content_heading
2013-03-04T11:45:27+00:00 DEBUG (7): Checking ESI block candidate: cms.wrapper
2013-03-04T11:45:27+00:00 DEBUG (7): Checking ESI block candidate: cms_page
2013-03-04T11:45:27+00:00 DEBUG (7): Checking ESI block candidate: messages
2013-03-04T11:45:27+00:00 DEBUG (7): Checking ESI block candidate: footer
2013-03-04T11:45:27+00:00 DEBUG (7): Checking ESI block candidate: before_body_end
2013-03-04T11:45:27+00:00 DEBUG (7): Checking ESI block candidate: mp_zopim_live_chat
2013-03-04T11:45:27+00:00 DEBUG (7): Checking ESI block candidate: m_core_singletons
2013-03-04T11:45:27+00:00 DEBUG (7): Checking ESI block candidate: msemanticbasic.business
2013-03-04T11:45:27+00:00 DEBUG (7): Checking ESI block candidate: core_profiler
2013-03-04T11:45:27+00:00 DEBUG (7): Set Varnish cache flag header to: 1
2013-03-04T11:45:27+00:00 DEBUG (7): Set ESI flag header to: 1
2013-03-04T11:45:28+00:00 DEBUG (7): Checking ESI block candidate: global_messages
2013-03-04T11:45:28+00:00 DEBUG (7): Set Varnish cache flag header to: 0
2013-03-04T11:45:28+00:00 DEBUG (7): Set ESI flag header to: 0
2013-03-04T11:45:29+00:00 DEBUG (7): Checking ESI block candidate: messages
2013-03-04T11:45:29+00:00 DEBUG (7): Set Varnish cache flag header to: 0
2013-03-04T11:45:29+00:00 DEBUG (7): Set ESI flag header to: 0

That's all the stuff I see in the log when opening up pages.

aheadley commented 11 years ago

Ok, nothing interesting in there unfortunately. I'm going to try to reproduce this with the exact version of Varnish you're using.

danielrona commented 11 years ago

That thought was awesome! I uninstalled 2.1.3 and installed 3.0.2 directly from the varnish website repo. It works!

So I guess there must be varnish / turpentine issue with the version

But in varnishlog I see alot of

    0 CLI          - Wr 200 0
    0 CLI          - Rd ban.url here_seo_rewrite_url_from_a_product

Not sure what that means though

aheadley commented 11 years ago

In Varnish lingo "ban" means purging from the cache. Turpentine bans product URLs when they are saved in the admin and when they go out of stock so those ban.url commands should correspond to one of those events.

danielrona commented 11 years ago

Ok, so far testing wise caching seems to work orders are possible, no issues yet - thanks for solving this and of course the extension itself!

aheadley commented 11 years ago

Glad it's working for you! I'm not able to reproduce this with Varnish 2.1.3 compiled from source, did you install your version of 2.1.3 from the Debian repos or did you get it from varnish-cache.org?

danielrona commented 11 years ago

From the debian repo

keyur-iksula commented 9 years ago

Any one have better solution ?? as i have installed latest version varnish 3.0.5 still its not working.

miguelbalparda commented 9 years ago

@keyur-iksula please see the devel branch, you are a couple of versions behind.

keyur-iksula commented 9 years ago

Thanks Miguel, i have upgraded to latest version as per your suggestion and then written hole punching code in turpentine_esi.xml, looks working fine for me.