Purge not working
-
For some reason I can not get this plugin working.
I can purge with “curl -X http://www.example.com/” but not via plugin.
Removed my custom VCL and replaced it with “DreamHost’s Varnish VCL Collection” but still no luck. I’m quite new to this and just trying to figure it out.
Any suggestions what might be wrong?
-
What version of Varnish are you using? What are your server specs? Is Varnish on the same server with a different port? Have you tried using W3TC, which also has a varnish purge function and does that work?
It is freshly installed Debian Wheezy with Apache (2.2.22) on :8080 and Varnish (3.0.4) on :80 on the same dedicated server.
I have not tried installing W3TC, I will try, though.
Could it be that I am missing any Apache/PHP modules? I have kept it to bare minimum – just added mod_rewrite for Apache and php5-mysql for WordPress to work.
W3TC is actually working just fine. I see PURGE requests in logs and content does change.
Well THAT is weird. W3TC and I use (pretty much) the same calls. It just may not be compatible with your setup :/
What happens when you press on the ‘purge all’ button from the admin dashboard? Does anything get sent to the logs?
This is what I get from “varnishlog -i RxRequest” with Varnish HTTP Purge
13 BackendClose – default
13 BackendOpen b default 127.0.0.1 53232 127.0.0.1 8080
13 BackendReuse b default
11 SessionOpen c XXX.XXX.XXX.XXX 55668 :80
11 RxRequest c GET
11 ReqEnd c 701763777 1384376046.673057318 1384376046.936959267 0.000141621 0.225373268 0.038528681
11 RxRequest c GET
11 ReqEnd c 701763778 1384376047.228256226 1384376047.228447437 0.291296959 0.000092506 0.000098705No PURGE request.
Here is what W3TC gives:
13 BackendClose – default
14 SessionOpen c YYY.YYY.YYY.YYY 54397 :80
14 RxRequest c PURGE
14 ReqEnd c 701763808 1384376296.350775242 1384376296.351009369 0.000119686 0.000158310 0.000075817
13 BackendOpen b default 127.0.0.1 53239 127.0.0.1 8080
13 BackendReuse b default
11 SessionOpen c XXX.XXX.XXX.XXX 57987 :80
11 RxRequest c POST
11 ReqEnd c 701763807 1384376296.085081816 1384376296.361084223 0.000796795 0.275909424 0.000092983
13 BackendReuse b default
11 RxRequest c GET
11 ReqEnd c 701763809 1384376296.402214766 1384376296.813630819 0.041130543 0.373515606 0.037900448
11 RxRequest c GET
11 ReqEnd c 701763810 1384376296.857321739 1384376296.857544422 0.043690920 0.000108242 0.000114441
11 RxRequest c GET
11 ReqEnd c 701763811 1384376296.897111416 1384376296.897348166 0.039566994 0.000117540 0.000119209
14 SessionClose c error
14 SessionOpen c XXX.XXX.XXX.XXX 58001 :80
14 RxRequest c GET
14 ReqEnd c 701763812 1384376296.906204939 1384376296.906378984 0.000067472 0.000091791 0.000082254
15 SessionOpen c XXX.XXX.XXX.XXX 58003 :80
15 RxRequest c GET
15 ReqEnd c 701763813 1384376296.906588316 1384376296.906728745 0.000045776 0.000065804 0.000074625
16 SessionOpen c XXX.XXX.XXX.XX 58002 :80
16 RxRequest c GET
16 ReqEnd c 701763814 1384376296.908138037 1384376296.908271790 0.000042915 0.000061512 0.000072241
16 RxRequest c GET
16 ReqEnd c 701763815 1384376296.958436251 1384376296.958628416 0.050164461 0.000091314 0.000100851Since this is a machine I am just playing with (and learning things meanwhile), I have no problem sharing root access to it in case you would be interested in figuring this out.
Sadly I’m the WP expert not the Varnish one. I’ll go fetch the guy who is Varnish Brilliant on the team to see if he has an idea. There’s no reason for that, unless some other plugin is conflicting (did you test with just this plugin active, and the default theme?)
Everything is freshly installed and there are no other plugins enabled. Just default (latest) WordPress installation with 1 post, 1 comment, 1 page in it.
I would love to see a solution for this situation as I really want to keep my WordPress install as “pure” as possible and do not want to install W3TC just for this one function.
the “Varnish HTTP Purge” is making “purge” command, which is not compatible with varnish 3.x. “Ban” calls must be used with 3.0.
Varnish 2.x: “purge” = Varnish 3.x: “Ban”
Can you link me to specs where that is defined? We use it with PURGE on v3 just fine.
https://www.varnish-cache.org/docs/3.0/tutorial/purging.html
That says pretty clear that purge should still work.
I couldnt get “purge” to work, but i can with ban:
https://www.varnish-cache.org/docs/3.0/installation/upgrade.html
I’ll update the doc to say you need to support Purging, which IS compatible with 3.0, you just have to enable it. And yes, it’s still supported by Varnish, because in the section you linked to, they said you have to change your purge to no longer access variables:
sub vcl_hit { if (req.request == "PURGE") { purge; error 200 "Purged."; } }
So if that’s not working, you need to put purge back in your VCLs π
Read https://www.varnish-cache.org/docs/3.0/tutorial/purging.html
Forgive me if I am not seeing it but was there a fix for Shmaarts? I ask because I’m having the exact problem but it wasn’t clear to me if the “Ban” routine was the solution or not.
Thanks guys for the information
CrossEye- The ‘fix’ is that you have to support PURGE. If you need more help, please make your own post.
- The topic ‘Purge not working’ is closed to new replies.