Our drupal 7 site was running so slow it was almost unresponsive, so I had to install varnish 2.1.5 this weekend. I got it up and running, and everything is now lightning fast, users can login and everything else is good... except that none of our authors can post new content.

When new content is posted, whether it's from the admin overlay or the actual node/add/news path, the URL just reloads and nothing happens. The form data is all in the Request Payload, the SESSION cookie is set, Varnish supposedly isn't caching... and yet nothing happens. I even installed the varnish module for drupal, but that only seems to handle reporting, and not actually doing anything.

Here's my default.vcl file.

I'm not seeing anything suspect in the vcl, but it certainly seems to be screwing something up.

Edit: I should point out that I don't have any issues changing settings in admin, or doing anything else, other than posting content, so it's not like all forms are broken. It might have something to do with ckeditor which is only present on the new content pages, but that seems like a stretch to me.

Edit 2: Realized I can create new blocks as admin, which uses the ckeditor which means that doesn't have anything to do with it. No new entries are getting put inserted into the node table and there's nothing suspicious in the watchdog logs.

  • are the Nodes being stored in the database? Does watchdog report any errors, or your status page? Are there any errors in your apache logs?
    – tenken
    Feb 10, 2015 at 18:27
  • Nodes are not being stored in the database. The recent log messages don't show anything errors when I try and post. There also aren't any errors in the apache logs.
    – Mordred
    Feb 10, 2015 at 19:24

2 Answers 2


I finally found a solution. Inside my default.vcl file I added the following block at the top of sub vcl_recv:

sub vcl_recv {

  # forward request directly to Apache if SESSION cookie is set.
  if (req.http.Cookie ~ "(SESS[a-zA-Z0-9]*)=") {
    return (pass);

  ... # whatever else you need to do in vcl_recv

Basically I'm just checking to see if my session cookie is set (anyone else reading this might have one formatted differently) and if so, forwarding it to Apache. This seems to have fixed the problems as new content can be posted again. Not really sure why the elaborate cookie filtering I had in place (and which was working in every other case except posting new node content) didn't work, but this seems to be the solution, even if it feels a little heavy handed.


Not sure if these will help you at all, but I've had my share of tangling with varnish and a few things that have helped me are:

Install the Varnish module if you haven' yet.

You might want to also look into using secure pages to force drupal to grab any admin or node forms in https (note you will need to enable ssl on your server if you haven't done so already). I had an issue myself with bots trying to login to my site. I discovered that by using https I could bypass the cache servers. Might be worth a try to see if that clears up your issues.

  • I have the varnish module installed, but it doesn't seem to do much other than tell me varnish is running and then give me stats on cache hit/misses. I don't really see how secure pages would benefit me either, and we don't have SSL installed on this server.
    – Mordred
    Feb 10, 2015 at 19:44
  • Using SSL will cause the site to talk directly to the server, bypassing varnish. So if node/add was under an https, the form would never be cached via varnish. However, as you don't have SSL, you would need to install that for this answer to help at all.
    – Jance
    Feb 10, 2015 at 19:58
  • Even if I did have SSL, our writers wouldn't be able to publish anything through the admin toolbar overlay (which wouldn't be on SSL) and I'm told that's where they do all their work.
    – Mordred
    Feb 10, 2015 at 20:03

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.