This topic has 24 replies, 2 voices, and was last updated 6 years, 6 months ago ago by Olga Barlow
Hi, Dreamhost has pinpointed the problem with my site working with their varnish caching, and tell me it is an error in the coding with xstore theme. They told me to specifically mention that pages are set to no cache and that the theme is rewriting cookies and php sessions for every page load.
I’ll include the varnish error log in the private section below. The following are the warning I get on the varnish status in the dashboard:
Varnish is running but is unable to cache your site. Please review the following output to diagnose the issue.
Something is setting the header Cache-Control to “no-cache” which means visitors will never get cached pages.
Something is setting the header Cache-Control to “max-age=0” which means a page can be no older than 0 seconds before it needs to regenerate the cache.
The “Age” header is set to less than 1, which means you checked right when Varnish cleared the cache for that url or Varnish is not serving cached content for that url. Check again but if it happens again, then either the URL is intentionally excluded from caching, or a theme or plugin is sending cache headers or cookies that instruct varnish not to cache.
Something is setting the header Pragma to “no-cache” which means visitors will never get cached pages. This is usually done by plugins.
A plugin or theme is setting a PHPSESSID cookie on every pageload. This makes Varnish not deliver cached pages.
Please help me configure xstore to work with their varnish.
Thank you
Hello,
We see that problem is related to WC plugin sessions. Is cache configured according to WC docs https://docs.woocommerce.com/document/configuring-caching-plugins/ ?
Does varnish caching works fine with the official WC theme – Storefront? Can your hosting confirm that these errors do not appear with official WC theme?
Regards
Hi,
Yes they confirmed it was working fine with other official themes.
Hello,
Ok. Provide, please, Dashboard and FTP access and tell us the path to error logs to check them.
Regards
Hi, Ok I’ll add them below. Thanks
Hello,
We have activated the official WooCommerce theme Storefront and see the same issues http://prntscr.com/jhnw82
So, it does not work with the official WC theme. Please, make it work with the official theme and then contact us if the problem remains with our theme only.
Regards
Look, I renewed and paid for the extended support from your team. While, I see that neither you or my hosting company wants to really help me and just pass it off to someone else, I would appreciate it if you could tell me who might actually help me.
I feel like I’m just being dismissed.
You’re reply came off as rather “snarky.” If I could “make it work”, I wouldn’t need your help, or your theme in the first place would I?
Dear @VitalVibeSource,
We are theme support and we are able to help you only with issues related strictly to our theme. If you use third-party cache extension that has known issues with WC plugin (if you read this post https://docs.woocommerce.com/document/configuring-caching-plugins/ you know that ) we can do nothing.
If you and the hosting provider that offers you that cache can’t make it work even with default theme then our theme is not the reason of the problem. Try another cache that does not have such problems with WooCommerce plugin if you chose WooCommerce as the main platform to sell products.
Regards
It appears it is your theme, but a few plugins were also causing issues to make the default theme appear to do the same.
Here is the reply from Dreamhost:
The theme Xstore is still very much causing issues
with Varnish, the issue your theme developers mentioned with ‘storefront’
was being caused by the plugins. So now, all that should be causing
issues when abandoned-cart is disabled is the theme if/when they try to
troubleshoot it again.
Hello,
The cart option persists in both themes – default and our theme because your site is e-commerce site. You need to make sure that all the problems are fixed with the official theme and then we’ll check what issues are still caused by our theme and fix them. So, have your hosting support fixed all the problems related to WC and other plugins that are enabled at your site?
Have you changed the Dashboard and FTP access? We can’t login anymore to check this.
Regards
Hi,
There might be some confusion about the cart issue. I had copied the reply from my host company, and they were referring to a plugin that needed disabled. I did disable this plugin like they did in their test.
They have tested the site with Woostore and the two plugins mentioned disabled and were able to get the varnish to work.
They have told me that you should be able to test the site with the Woostore theme yourselves now and see that it does work, but Xstore does not.
I’ll include the new logins below.
Thank you
Hello,
What plugins did they mention? You did not tell us what plugin.
And how can we check if the cache is enabled? Because when we use Tools > Varnish Debugging , disabled all the plugins, enabled default theme and tested for example about us page we still had “A caching service is running but is unable to cache your site.”
Has Dreamhost support any live chat to contact them? Because it’s difficult to solve the problem when you post their messages and we can’t ask things that we need to specify.
Regards
They said I can create a new access on Dreamhost for you. You can then log-in and chat with them directly.
I need an email address to grant you access. Which one should I use?
I’m also getting 503 and %04 errors. I had to contact dreamhost again and have them reset the services to get the site back up. When I asked them what is causing this, they told me the following, “Checking into the site logs, I’m seeing some errors coming from the xstore theme. If there are theme errors on the site backend, it can processes to time out, and the site to load with a 503 or 504 error.”
I also need to know your email address, so I can assign you the access to dreamhost and their chat help.
As far as the plugins, it was abandon-cart plugin, as well as woozone (this one was temporary). The abandon-cart plugin has been disabled.
Hello,
We have sent you email to your registration email. Check, please.
Regards
Hi Olga,
Here is the hosting credentials, which will give you access to their chat help.
The link they gave me yesterday only had email, but today they said to give you sftp access, so I created a new user for you to be able to access chat help and everything else you need.
I also followed up with them on the link you provided me to woocommerce about the varnish rules that need to be implemented.
Here is what they said:
-Each of the rules you provided is already in our VCL for Varnish, and I’ve also checked your server
directly to be completely sure that they are in place correctly. Unfortunately, even with these rules in place, your custom theme is still
running into a conflict.
Do your theme developers have any other customVCL rules that they would like us to add, knowing that these are already
in place?
Just let us know, and we’ll be happy to help further.
Thank you for helping me resolve this!
Hello,
We are trying to connect to your server and can’t anymore. Got the error
Response: 331 Password required for wp_i469jv
Command: PASS ********
Response: 530 Login incorrect.
Error: Critical error: Could not connect to server
Can you, please, check if FTP access is correct?
Regards
I reset the password again. Try this one
This one works fine. Thanks. Our developers will be able to start tomorrow morning. I’ll inform you about results.
Regards
Thank you Olga!
Hello,
We have made some changes and commented out the add_action( 'init', 'etheme_set_customer_session', 10 );
for the etheme_set_customer_session function https://prnt.sc/jlowc9
Changes were made in parent theme (xstore/framework/woo.php) because it does not work from the child theme, so be careful before the parent theme update and do this changes again once you update theme in future.
Regards
Ok, but when I checked the varnish debugging, I got the same error still:
A caching service is running but is unable to cache your site.
Your server IP setup looks good.
Your server is running Apache.
The “Age” header is set to less than 1 second which means the page was generated without caching.
Were you able to get the theme to work with varnish after these changes?
Also, I’m not sure if this is related to changes that were made, but my main menu has disappeared and every time I choose the correct one, nothing changes. It still says I need to select a menu?
Hello,
1) If you want to use varnish that line should be commented out.
We have also installed cache plugin to speed up your site. I have checked and don’t see problem with varnish cache https://gyazo.com/a7c63809c7d6883b670a77d6c64ade24
2) That line of code can’t affect the menu. I don’t see problem with the menu https://gyazo.com/ff0d522d4da8c3c54bc405e47bf1907b
Regards
You must be logged in to reply to this topic.Log in/Sign up