Questions tagged [varnish-4]
180 questions
1
vote
1 answer
Err_Connection_Refused after modifying Varnish default file
I have properly installed varnish 4. Varnish is on port 80 while apache on port 8080.
After editing /etc/varnish/default.vcl and inside sub vcl_backend_response writting to cache static files:
if (bereq.url ~…

Aaron
- 33
- 2
- 6
1
vote
1 answer
Varnish 4 is retrying the backend request every 120 seconds continuously
Varnish 4 is retrying the request every 120 seconds continuously if the corresponding backend endpoint is taking more than 120 seconds. While the backend is retrying the request, the original varnish request is waiting. The original varnish request…

Dileep Reddy
- 41
- 5
1
vote
1 answer
varnish4 vs varnish3 - grace behaviour
I'm currently working on a migration project from varnish3 to varnish4 and
I am facing a behaviour that I don't understand.
To put it simply, with the same configuration file used both in Varnish3
and Varnish4, I don't have the same results…

user1961659
- 87
- 1
- 7
1
vote
1 answer
return(pass) HIT or MISS
I have understand when someone uses return(pass) is because want not cache the content and pass the request to the backend.
So, if this is really so, why a I get HIT in place of MISS.
Here es my vcl:
sub vcl_recv{
if (req.method == "GET" &&…

Little crazy
- 113
- 2
- 7
1
vote
2 answers
Varnish host_header is not sended to backends
I trying to run varnish with two backends that needs exactly hostnames. But my nginx is receiving a localhost host header.
This is my configuration:
probe healthcheck {
.url = "/";
.interval = 5s;
.timeout = 15s;
.window = 5;
…

ePhillipe
- 73
- 1
- 7
1
vote
0 answers
Varnish 4 -> how can i load content into Varnish using Curl
I have 8 servers caching content from an API, the issue is keeping them at sync.
So i was wondering the same way we can http PURGE via curl, can i do the same to call each cache server and make it cache a specific url?
i tried doing it using curl…

Bruno
- 11
- 2
1
vote
1 answer
Varnish: purge if I have cookie in hash_data
Problem:
I couldn't purge my page. After many time I decided to find out how purge works and find!
As you can see we have used a new action - return(purge). This ends execution of vcl_recv and jumps to vcl_hash. This is just like we handle a…

Nikita_kharkov_ua
- 365
- 4
- 16
1
vote
1 answer
Varnish Not caching wordpress website. Tried some solutions present in blogs. Nothing worked for me
I was able to configure varnish, but it is not caching i guess. In the response header, i see these attributes:
Url : corp.zip.pr
Age →0
Via →1.1 varnish-v4
X-Varnish →98319
My default.vcl file is as below:
# Marker to tell the VCL compiler…

Pankaj kumar Panigrahi
- 761
- 1
- 5
- 16
1
vote
1 answer
varnish 4 to cache from multiple servers with different content
Using varnish 4 to cache different content of same request from multiple servers. It looks like it caches the first request from one server and keeps giving the same content for every subsequent request.
doing curl gives response with two caches…

user1609085
- 855
- 3
- 17
- 33
1
vote
1 answer
Varnish + nginx + ELB 499 responses
I am having varnish 4 server working with nginx as reverse proxy connected to ELB.
Every 2 days or so my server is stop responding and I see 499 responses in nginx access.log
restarting nginx is solving the problem.
Why am I started to get these 499…

guyyug
- 897
- 1
- 11
- 23
1
vote
1 answer
Connecting to Varnish 4 Admin Interface Over the Network
we have varnish 4 running on Centos 7.2. I cannot seem to connect to the admin interface over the network, even though everything seems to be configured correctly.
Here is the config inside of /etc/varnish/varnish.params
# Admin interface listen…

m3ta
- 171
- 7
1
vote
1 answer
Varnish 4.1 - Call a restart according to the backend response
Prior to Varnish 4, One could call a restart from vcl_fetch to start another flow reaching vcl_recv.
In version 4, logic was separated to client and backend, I need to be able to call a restart according to the backend response. One direction I…

Or Guz
- 1,018
- 6
- 13
1
vote
1 answer
Increase varnish grace time while backend is sick
We use Varnish Cache as a Frontend to a lot of our customers and we server stale content by grace while any backend is sick.
We do now have a failed backend and we want to increase the grace period (while it's sick), is that a possible scenario? I…

Mohamed Magdy
- 151
- 1
- 7
1
vote
1 answer
Viewing varnish cache miss urls along with the backend IP
I am using round-robin director in my vcl. I want to see all the cache miss urls along with the backend IP. Right now doing sudo varnishtop -i BereqURL it is only showing the urls not the backend ip where it is going
54.42 BereqURL …

tuk
- 5,941
- 14
- 79
- 162
1
vote
1 answer
Varnish 4 Basic Authentication constantly prompts for username and password
I'm using Varnish 4 on a test environment and want to protect access to content using Basic Authentication.
What I want to happen is that the first request causes a prompt for Basic Auth and then it no longer asks once the user has entered their…

John
- 1,688
- 1
- 12
- 9