Varnish does not seem to cache properly the ESI fragment.

I have set up varnish locally and tested it to make sure it works properly by pointing to a static HTML and then by fully caching the page and seeing the two X-Varnish keys. Both show cache keys and drastic improved performance. The next thing was to test esi fragments by making the footer pane be cachable via esi. The esi module is successfully adding the esi tag and looks something like this:

<esi:include src="http://mylocalsite.co:8080/forums/esi/panels_pane/ibase%3A29%3A279/0/aG9tZQ%3D%3D" />

ESI Markup Shows but SRC Leads to 503 Service Unavailable

http://mylocalsite.co:8080/forums is the root of the application and when I searched for the esi/panels_pane folders in the root, they were not there. Clicking on the link seen in the src leads to a 503 Service Unavailable. Adding them manually does not seem to help at all, or at least, there is nothing that gets dumped in there. I imagined is saved into memory only?

Steps to Reproduce

  1. Set render mode to ESI in /admin/config/development/esi
  2. Go into a panelized page and make one of the panes be cached as ESI
  3. Ensure varnish is running
  4. Preview site on the port varnish is listening to (my case is port 8080)
  5. Now the pane that has be made a fragment may or may not render a 503 notice in addition to the pane HTML itself.
  6. Looking at the source code reveals that the esi tag is there but when you click on the src link it always take you to a 503 page.

ESI Modules Used

  • ESI - Block
  • ESI - Edge Side Includes
  • ESI - Panels
  • Varnish (Not sure if I needed anymore)

default.vcl

  • default.vcl pastebin.com/yaW0hZeL
  • esi_blocks.vcl pastebin.com/1CMr6q4E
  • drupal.vcl pastebin.com/cz7zNDqQ

My Configurations

  • Varnish 3.0 varnishd (varnish-3.0.3 revision 9e6a70f)
  • Drupal 7
  • esi module - 7.x-3.x branch

Does anyone know what am I missing? Is the vcl file correct or missing something?

Comments

sam3k’s picture

Issue summary: View changes

remoming brackets from HTML tag so it shows to the user

sam3k’s picture

Issue summary: View changes

rephrasing question

erikwebb’s picture

Status: Active » Postponed (maintainer needs more info)

Does esi_block work for you or is this problem specific to esi_panels.

manarth’s picture

The URL provided - http://mylocalsite.co:8080/forums/esi/panels_pane/ibase%3A29%3A279/0/aG9tZQ%3D%3D - doesn't match the pattern we usually expect for ESI tags…are you running Drupal under a /forums subdirectory?

The pastebin for esi_block__recv shows that the VCL is still expecting the URL to start /esi/ rather than /forums/esi/ - if you're running under a subdirectory, you'll probably need to alter the URL patterns in the VCL.

erikwebb’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)
erikwebb’s picture

Issue summary: View changes

adding which esi modules im using