Host says Xstore is conflicting with varnish

This topic has 24 replies, 2 voices, and was last updated 6 years, 7 months ago ago by Olga Barlow

  • Avatar: VitalVibeSource
    VitalVibeSource
    Participant
    May 9, 2018 at 01:14

    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

    Please, contact administrator
    for this information.
    23 Answers
    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    May 10, 2018 at 13:42

    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

    Avatar: VitalVibeSource
    VitalVibeSource
    Participant
    May 10, 2018 at 17:39

    Hi,
    Yes they confirmed it was working fine with other official themes.

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    May 11, 2018 at 09:41

    Hello,

    Ok. Provide, please, Dashboard and FTP access and tell us the path to error logs to check them.

    Regards

    Avatar: VitalVibeSource
    VitalVibeSource
    Participant
    May 11, 2018 at 21:07

    Hi, Ok I’ll add them below. Thanks

    Please, contact administrator
    for this information.
    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    May 14, 2018 at 13:08

    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

    Avatar: VitalVibeSource
    VitalVibeSource
    Participant
    May 15, 2018 at 00:38

    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?

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    May 15, 2018 at 09:31

    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

    Avatar: VitalVibeSource
    VitalVibeSource
    Participant
    May 16, 2018 at 03:46

    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.

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    May 16, 2018 at 08:53

    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

    Avatar: VitalVibeSource
    VitalVibeSource
    Participant
    May 16, 2018 at 16:28

    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

    Please, contact administrator
    for this information.
    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    May 16, 2018 at 17:03

    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

    Avatar: VitalVibeSource
    VitalVibeSource
    Participant
    May 16, 2018 at 18:47

    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?

    Avatar: VitalVibeSource
    VitalVibeSource
    Participant
    May 17, 2018 at 01:36

    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.

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    May 17, 2018 at 10:15

    Hello,

    We have sent you email to your registration email. Check, please.

    Regards

    Avatar: VitalVibeSource
    VitalVibeSource
    Participant
    May 17, 2018 at 17:02

    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!

    Please, contact administrator
    for this information.
    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    May 21, 2018 at 15:01

    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

    Avatar: VitalVibeSource
    VitalVibeSource
    Participant
    May 21, 2018 at 15:34

    I reset the password again. Try this one

    Please, contact administrator
    for this information.
    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    May 21, 2018 at 15:53

    This one works fine. Thanks. Our developers will be able to start tomorrow morning. I’ll inform you about results.

    Regards

    Avatar: VitalVibeSource
    VitalVibeSource
    Participant
    May 21, 2018 at 16:34

    Thank you Olga!

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    May 23, 2018 at 17:56

    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

    Avatar: VitalVibeSource
    VitalVibeSource
    Participant
    May 23, 2018 at 18:42

    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?

    Avatar: VitalVibeSource
    VitalVibeSource
    Participant
    May 23, 2018 at 19:08

    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?

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    May 24, 2018 at 10:28

    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

  • Viewing 24 results - 1 through 24 (of 24 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.