By activating the "Purge" the site is slow
-
Hello everyone!
I recently made the varnish configuration on my server where I have 3 hosted domains (with wordpress).
My server:
2 cores 2GHZ
4GB RAM
Varnish 4 + MySQL 5.6 + Apache + PHP 5.5
CentOS 7
My default.vcl: http://pastebin.com/YQUZAad4
Print of ‘varnishstat’: http://prntscr.com/bq50yc
One of the sites that are on this server: http://bit.ly/29oGs21I have a VCL leaving the site very fast, fast even though WordPress use. When I publish something it does not update the site, maintains the previous cache, updated only when I restart the varnish “service varnish restart“.
I was analyzing my .VCL and found the cause of the problem is this code here (into vcl_recv):
if ( !( req.url ~ "wp-(login|admin)" )) { unset req.http.Cookie; }
When I remove this code to post updates back to work and if I post it shows to everyone, if I delete it goes for all (users). Buuut the site is not as fast as before, and the Load server is high (Load Average 0.50~)
Summing up.
Without the informed code (Load Average 0:50 ~ 1 and exchange slow pages)
With the informed code (Load Average 0:18 ~ 0:23 and exchange pages ‘ninja’)and
Without the informed code (updated posts, it shows what was published instantly)
With the informed code (cache posts, not updated when I make a new post)When I click publish with the plugin “Varnish HTTP Purge” enabled the site is slow and takes a few seconds to publish … still does not update the cache when the above code is in default.vcl.
It would be very important that in the publication of some varnish station was “upgraded”. I appreciate any help !!!
Thx from Brazil
- The topic ‘By activating the "Purge" the site is slow’ is closed to new replies.