Tag Info

New answers tagged

0

Just add header field Expires: Thu, 01 Dec 1994 16:00:00 GMT to every response. And of course set the date to the end of the month. Varnish should honor this header field. And be sure to remove all cache control headers that could disable caching (max-age, no-cache, etc.).


1

Chances are good that are sending cookies in your request. Varnish doesn't cache anything with cookies in them. This from the builtin.vcl for Varnish 4: 47 sub vcl_recv { 48 if (req.method == "PRI") { 49 /* We do not support SPDY or HTTP/2.0 */ 50 return (synth(405)); 51 } 52 if (req.method != "GET" && 53 ...


1

I'm not sure you're setting up grace mode correctly. The varnish book seems to indicate that you should be setting some of this in vcl_fetch and perhaps vcl_recv. (I'm not familiar with Varnish, but I hope to be soon). Core grace mechanisms A graced object is an object that has expired, but is still kept in cache Grace mode is when Varnish uses a ...


0

You can try increasing the ttl value to beresp.ttl = 30m; i think varnish has a default ttl value of 120 seconds. Is the Age: header's value increasing on every next hit?.


0

Check what headers are being sent to Varnish by Apache. You can also explicitly set the TTL of the content in Varnish.


0

can you post the content of /etc/varnish/default.vlc configuration file? Look like your request don't even go to varnish, or at least go though it and varnish does check whether or not the content is reachable from cache. Moreover, can you add this into this configuration file, and restart varnish after this? And then from your client (wget or curl) give us ...


0

Varnish does not do SSL, so doing Varnish->nginx, or Varnish->HAProxy won't work with SSL. On the other hand, putting anything in front of Varnish (besides SSL termination) will probably strip you of the performance benefits Varnish provides. Having Varnish (cache) share hardware and/or OS with webserver may, or may not be a problem. It hugely depends on ...


2

Take a look at your request headers. Cache-Control:no-cache and Cache-Control:max-age=0 Edit: These were not the cause of trouble and can be safely ignored. Varnish documentation stating: Note By default, Varnish does not care about the Cache-Control request header. If you want to let users update the cache via a force refresh you need to do ...


1

The performance will be limited by your hard drive's performance. Depending on the access pattern of the content cached, performance could be poor since varnish may need to randomly seek thousands of small files. Consider using memory rather than disk if possible, you will have less capacity but the performance for the most frequently access content maybe ...


0

The permissions on the directory where varnish compiles the vcl to, Ubuntu uses /var/lib/varnish/ Try chmod 666 -R /var/lib/varnish/ From your code above you're not running as root, try testing as root or using sudo. If it works, then the permissions are the problem.


0

Sometimes the various backends need more time to load a response for varnish, simply increasing the following usually helps: backend default { .host = "x"; .port = "x"; .connect_timeout = 30s; .first_byte_timeout = 30s; .between_bytes_timeout = 30s; }


1

backend default { .host = "0.0.0.0"; .port = "5000"; } This is your problem. You can not have backend at 0.0.0.0. You probably want to use 127.0.0.1 instead. (0.0.0.0 is used to tell system to listen for connections to any IP, but is not a valid IP to connect to) Edit: ok i was too quick to answer. This won't fix the permission issue. Give me a ...



Top 50 recent answers are included