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="" />

ESI Markup Shows but SRC Leads to 503 Service Unavailable 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
  • esi_blocks.vcl
  • drupal.vcl

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?


Issue summary:View changes

remoming brackets from HTML tag so it shows to the user

Issue summary:View changes

rephrasing question

Status:Active» Postponed (maintainer needs more info)

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

The URL provided - - 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.

Status:Postponed (maintainer needs more info)» Closed (cannot reproduce)

Issue summary:View changes

adding which esi modules im using