Questions tagged [varnish-4]
180 questions
0
votes
1 answer
varnish 5.0 varnishstat show empty response with parameter f
I have a problem with varnishtat, who return empty solution with the f parameter.
I plan to use varnishstat to monitor varnish, like that :
varnishstat -f MAIN.uptime
on previous version of varnish, like 4.0.3, there is no problem, i receive the…

Yannick Eurin
- 199
- 1
- 1
- 7
0
votes
1 answer
Varnish emergency backend or serve static error
My idea is to configure Varnish-cache on primary backend fails (HTTP 503 for example), first of all to try another backend, if failed, serve static error message.
Is it possible to configure it that way? P.S. I don't want varnish to work with…

Juri Kononov
- 3
- 1
0
votes
2 answers
Varnish4: need a random integer value
I need a random integer value in Varnish 4.
The std.random() function results in a REAL with three trailing digits.
In VCL:
set req.http.X-AB-test1 = std.random(1,4)
Observed result:
X-AB-test1=3.182
I would love to find some equivalent to…

Tarwin
- 592
- 5
- 11
0
votes
2 answers
Varnish Breaking Social Sharing
Facebook uses a curl with range option to retrieve HTML of a page for sharing. Varnish is only returning page header info and not the html. This is the result I would say 75% to 80% of the time. Every once in a while it returns the correct Result…

Christopher Pernice
- 11
- 4
0
votes
1 answer
Varnish VTC include - override backend{} -
I am currently trying to add some unitests to my growing varnish config file.
i managed to initialize it, and i think i got the basics of varnishtest and vtc format.
i need to load my varnish.vcl - inside there, are a few backends. which have .host …

Helmut Januschka
- 1,578
- 3
- 16
- 34
0
votes
1 answer
how to enable full site accelaration from varnish
I am using Varnish 4.0.3 and want to cache my complete website (except some/admin pages) on varnish. To achieve it, I have below questions:-
How can I warm up varnish cache
Full site acceleration on Varnish
How to handle, if back-end down
How to…

Pankaj Shukla
- 11
- 3
0
votes
1 answer
How to hold same requests going to backend in varnish4.0.3 until first one responds
My website has below request flow-
AWS CloudFront -> ELB -> Varnish 4.0.3 -> NginX (reverse proxy) -> ELB -> Drupal7
Working: Normal flow is working as expected.
Problem: When I run load-testing on my site, same request is coming to Drupal server…

Pankaj Shukla
- 11
- 3
0
votes
1 answer
Varnish + ELB open sessions
I am using varnish 4 + nginx + ELB. When I run varnishlog I keep seeing new sessions like the following every 2 seconds:
* << Session >> 65622
- Begin sess 0 HTTP/1
- SessOpen 10.90.148.245 16560 :80 10.13.12.136 80…

guyyug
- 897
- 1
- 11
- 23
0
votes
0 answers
not getting http referer in varnish cache in req.http.referer
I am using varnish for caching in my website. Now I have a requirement that I have to show some other slider when the user is redirected from a website other wise I have to show normal one.
As template is getting cached php code is not getting…

Jiva
- 49
- 5
0
votes
1 answer
Setting HTTPOnly flag on cookie in varnish 4
We have cookies that are generated by an appliance in our infrastructure, we do not have access to the configuration of the appliance so cannot set the HTTPOnly flag on the cookies it generates directly.
We do have a varnish 4 cache in front of this…

thewire247
- 795
- 1
- 9
- 24
0
votes
1 answer
How to restrict how many CPU cores Varnish uses?
I have an 8 core server which will be running Varnish in front of a HTTP server, both on the same machine.
How can I restrict Varnish to use no more than 4 cores?
I have read of the worker pools in the documentation but it also says this:
"Although…

user1796995
- 313
- 4
- 17
0
votes
1 answer
Changing default_ttl on Varnish 4 vcl file
I am willing to change the default ttl value from the configuration file and not through the varnishd.

guyyug
- 897
- 1
- 11
- 23
0
votes
1 answer
Is it a good idea to cache a sitemap.xml?
I have a sitemap.xml page which is dynamically generated by my Symfony application. I also use Varnish. I would like to know if it's a good idea to cache the sitemap.xml page or if it's useless?
Thanks.

unadivadantan
- 363
- 4
- 14
0
votes
1 answer
Varnish4 - change PURGE response headers
I'm trying to change PURGE response headers in Varnish4
HTTP/1.1 200 Purged
Content-Type: text/html; charset=utf-8
Date: Fri, 02 Sep 2016 19:57:56 GMT
Retry-After: 5
Server: Varnish
X-Varnish: 163921
Content-Length: 241
Connection: keep-alive
I…

user2982789
- 15
- 2
0
votes
1 answer
How can I reference an ESI URL that includes an encoded HTML entity with Varnish?
I am using Varnish 4.1.2, and trying to include ESI content. Sometimes, the URL for the included content might include encoded HTML entities, such as ' (').
For example, I have the following in the HTML returned by my app for the outer…

pkaeding
- 36,513
- 30
- 103
- 141