[solved] LiteSpeed cache stopped working after upgrading the LiteSpeed

Discussion in 'LiteSpeed Cache General' started by A.Chakery, May 3, 2018.

  1. A.Chakery

    A.Chakery Member

    Hello,

    After upgrading to "5.2.6" the LS caching seems to be not working anymore.

    A Good example would be :
    https://www.webpagetest.org/result/180502_B2_0a51048c44a39b6c913552413ba7c557/

    Previously the First Byte Time was about 0.6-0.8s but now its about 5s which is totally ridiculous. And when we try to load the pages as guests they load super slow as its shown in the test results.

    Please note that prior to the update the fully loaded time was around 3-3.5s.

    I would appreciate any help.


    PS: upgrading to "5.2.7" did not solve anything.


    Thank you in advanced.
     
    Last edited by a moderator: May 3, 2018
  2. Unique_Eric

    Unique_Eric Administrator Staff Member

    Hi A.Chakery,
    Possible site running by Apache web server?
    Could you paste response header from browser developer tool? Should be in Network->Document->Response Header
     
  3. A.Chakery

    A.Chakery Member

    Dear Unique_Eric,
    Thank you for your reply.

    Yes, we are definitely on LiteSpeed.

    I am not very experienced with linux and we have ServerAdmins, but as far as I know we are on LiteSpeed.

    This is the response results from my terminal and its LiteSpeed. Interestingly the LiteSpeed cache control is also seems to be active but practically not working.

    Code:
    < date: Thu, 03 May 2018 12:31:56 GMT
    < content-type: text/html; charset=UTF-8
    < set-cookie: __cfduid=dfdd0bc9d22804a436f6abe6a033035c51525350714; expires=Fri, 03-May-19 12:31:54 GMT; path=/; domain=.serialcart.com; HttpOnly
    < link: <https://serialcart.com/?p=46>; rel=shortlink
    < set-cookie: woocommerce_recently_viewed=46; path=/; domain=.serialcart.com
    < x-litespeed-cache-control: public,max-age=604800
    < x-litespeed-tag: 93b1_URL.598cd2f215ecaea656415ad555eb49a7,93b1_Po.46,93b1_
    < vary: Accept-Encoding,Origin
    < alt-svc: quic=":443"; ma=2592000; v="35,37,38,39"
    < x-turbo-charged-by: LiteSpeed
    < expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
    < server: cloudflare
    < cf-ray: 4152bf4d7c99597e-VIE

    Thank you again
     
  4. Unique_Eric

    Unique_Eric Administrator Staff Member

    Hm, seems cache not working.
    No `x-litespeed-cache` tag and source page is not generated by cache.
    Could you provide report number by Navigate to **LiteSpeed Cache > Report**, press the **Send to LiteSpeed** button, and let us know what it says under "Report Number." We'll be able to access the report from here and get some information about your configuration that might be helpful.
     
  5. A.Chakery

    A.Chakery Member

    Sorry for the delayed reply, I was waiting for our server admin reply regarding this issue.
    This is our report number : FRYMLWZY

    Thank you again
     
  6. A.Chakery

    A.Chakery Member

    Followup:

    Our server admins solved this issue however I would appreciate if you provide us with more details on what has caused this issue ?

    Thank you
     
  7. NiteWave

    NiteWave Administrator

    usually it's permission of cache root not set correctly.
    in cPanel server, it's /home/user/lscache. owner:group should be nobody:user (NOT user:nobody)
    yes, only your host or server admin can fix it.
     
  8. Àlex Miras

    Àlex Miras Member

    Code:
    cache-control: no-cache, must-revalidate, max-age=0
    cf-h2-pushed: </min/09942.css>,</min/1ed0b.js>,</min/a44be.js>,</min/css_async.js>
    cf-ray: 4200a642599b6127-BCN
    content-encoding: br
    content-type: text/html; charset=UTF-8
    date: Thu, 24 May 2018 15:03:32 GMT
    expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
    expires: Wed, 11 Jan 1984 05:00:00 GMT
    server: cloudflare
    status: 200
    vary: Accept-Encoding
    x-litespeed-cache-control: private,max-age=1800
    x-litespeed-tag: 7b01_tag_priv,public:7b01_URL.6666cd76f96956469e7be39d750cc7d9,public:7b01_F,public:7b01_Po.821,public:7b01_PGS,public:7b01_
    x-powered-by: PHP/7.2.5
    x-turbo-charged-by: LiteSpeed
    I have a similar issue, litespeed cache isn't working in any of the accounts and always missing the cache hit or miss header
    Report: ZZVBLTXY
    And Cache Root Setup seems Ok
    Code:
    Server level    /home/lscache/    /home/lscache/
    VHost level    lscache*    lscache*
    And I think I have the correct permissions on the account nobody:user
    Any ideas?
     
  9. MattW

    MattW Well-Known Member

    and here. Reported:

    Report number: BWOIPINI
    Report date: 05/24/2018 16:28:51
     
  10. Tishu

    Tishu Well-Known Member

    Hello,
    I see for your page:
    x-litespeed-cache:hit
    and the page cache is generate by lscache. Can you tell what is the problem?
     
  11. Tishu

    Tishu Well-Known Member

    You can check cache setup from this wiki https://www.litespeedtech.com/suppo..._wiki:cache:common_installation:cpanel-shared
     
  12. Àlex Miras

    Àlex Miras Member

    I checked the root cache setup and It says it's ok, but also
    Code:
     # bash <(curl https://www.litespeedtech.com/packages/lscache/set_cache_root_policy.sh)
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  7956  100  7956    0     0  14930      0 --:--:-- --:--:-- --:--:-- 14954
    Detect cPanel WHM environment
    
    Found server level cache root has already been set to: /home/lscache/
    List server root level cache root configuration files:
    /etc/apache2/conf.d/includes/pre_main_global.conf:CacheRoot /home/lscache/
    
    Found virtual host level cache root set to: /home/username/lscache
    List virtual host level cache root configuration files:
    /etc/apache2/conf.d/userdata/lscache_vhosts.conf:CacheRoot lscache
    [Thu May 24 16:16:41.706807 2018] [cpanel:warn] [pid 2642317] Failed to populate suspended users. Could not open directory: /var/cpanel/suspended
    Built /etc/apache2/conf/httpd.conf OK
    
    Backup /usr/local/lsws/conf/httpd_config.xml to  /usr/local/lsws/conf/httpd_config.xml.bak_lscache
    Check and remove any server level cache root and policy setting in LSWS config.
    Redirecting to /bin/systemctl restart lsws.service
    
    All the lscache folders of every account are nobody:(the user of the account) but no `x-litespeed-cache` hit or miss
     
  13. Àlex Miras

    Àlex Miras Member

    Another report for another account for If it helps to track the issue

    Número de informe: RXZTNYKP

    Fecha de informe: 05/25/2018 11:37:26

    Another thing that may be a clue or not:
    the lscache folder is nobody:user but all the subfolders and files are user:user except .cm.log that is nobody:user
    Is that correct?
     
  14. Jon K

    Jon K Administrator Staff Member

    On one of the accounts having issues, can you try removing: /home/$USERNAME/lscache
    Then do a graceful restart and see if cache starts to begin working?
     
  15. Àlex Miras

    Àlex Miras Member

    Done for one account and lscache "x-litespeed-cache" shows miss or hit :)
    But the problem is that no lscache folder is created in that account :/
    Is using the home/lscache folder?
     
  16. Jon K

    Jon K Administrator Staff Member

    Each account should have a lscache folder. Do some of yours do not?
     
  17. Àlex Miras

    Àlex Miras Member

    The one that I deleted the lscache folder don't have that folder after a service lsws restart
     
  18. Àlex Miras

    Àlex Miras Member

    But is the only one that have lscache working with "x-litespeed-cache" hit or miss in header)
     
  19. Jon K

    Jon K Administrator Staff Member

    Is it possible for you to open a ticket with us? We might need access to the server to figure out what is going on. Something seems very odd.
     
  20. Àlex Miras

    Àlex Miras Member

    Not I can't by myself (Your customer is iozoom hosting provider and i have a vps with them with cpanel + cloudlinux + lsws + lscache) but iozoom opened a ticket for me a while ago :)
    Thats your respone:
    I have deleted all the lscache folders and this script:
    Code:
    bash <(curl https://www.litespeedtech.com/packages/lscache/set_cache_root_policy.sh)
    "x-litespeed-cache" hit or miss in header for all accounts now but lscache folder in any account
    If you need to access the server I can send you the credentials :)
     

Share This Page