Varnish: check your config before you restart!
- Read more about Varnish: check your config before you restart!
- Log in to post comments
If you're using Varnish cache, you will be familiar with the "service varnish restart" then the "oh, there's a config error and now all my sites are down!".
Fear no more: there's a command to check your Varnish syntax before you restart. Just run:
$ varnishd -Cf /etc/varnish/default.vcl
And it will tell you what's wrong (or at least where the error is). If it prints out all your default.vcl, you're good!
Drupal site with Varnish, returning page without style on CTRL+F5
I had serious problems with a Drupal website with many Varnish optimizations.
Force caching for a specific page in Varnish
- Read more about Force caching for a specific page in Varnish
- Log in to post comments
Just a self-reminder, in the vcl_recv section (before sending request to the backend), check the url you want to always serve from cache and tell it to return(lookup);
if (req.url ~ "request_server.php$") { return(lookup); }Reload Varnish and get ready for a massive fall of your load if this bloody request_server.php was overloading your site uselessly...