Can't turn off caching once it's enabled.

Discussion in 'General' started by optize, Jun 22, 2011.

  1. optize

    optize Well-Known Member

    I made the mistake of turning on caching on one of our shared servers.

    We started receiving massive complaints due to old pages (yes, that's the point) so we turned off all values in the caching page.

    However, things are still being cached. We restarted Litespeed, still cached.... I deleted the cache folder, restarted Litespeed, it stopped writing to the cache folder but it still caches at times...

    Has anyone else had this problem? This is very odd.
  2. cmanns

    cmanns Well-Known Member

    Have you tried to manually check the lsws configuration file? If nothing in there then force reinstall 4.1.1 :cool:
  3. mistwang

    mistwang LiteSpeed Staff

    It is likely cached by browser, just clear browser cache and try again.
  4. optize

    optize Well-Known Member

    No, it's not.

    I re-installed Litespeed, still not working.

    Basically what's happening is all new domains that get added to the server cache the default cPanel page.

    I have to physically restart Litespeed for it to work for every new domain that gets added.

    Can someone look into this?
  5. mistwang

    mistwang LiteSpeed Staff

    Please check response header with firebug see if the default cPanel page has "LiteSpeed-Cache:hit", if not, it has nothing to do with page cache, just the new configuration has not been applied.

    Please note that cPanel delay applying new configuration, so new domain wont be take effect immediately, it will be become available in a little while. It is done intentionally by cPanel, not a LiteSpeed issue, same when Apache is used.
  6. optize

    optize Well-Known Member

    In firebug:

    Under Images:

    Date Mon, 27 Jun 2011 15:33:15 GMT
    Server LiteSpeed
    Accept-Ranges bytes
    Connection Keep-Alive
    Keep-Alive timeout=5, max=100
    Etag "195-4519f862-0"
    Last-Modified Wed, 27 Sep 2006 04:04:50 GMT
    Content-Type image/jpeg
    Content-Length 405
    Cache-Control max-age=604800
    Expires Mon, 04 Jul 2011 15:33:15 GMT

    Under HTML -> Cache

    Last Modified Mon Jun 27 2011 08:33:15 GMT-0700 (MST)
    Last Fetched Mon Jun 27 2011 08:33:15 GMT-0700 (MST)
    Expires Wed Dec 31 1969 17:00:00 GMT-0700 (MST)
    Data Size 1034
    Fetch Count 2
    Device memory

    I don't see anything related to Litespeed-Cache.

    Another thing I'm thinking is that it's not restarting apache after it adds the virtualhost.

    If I go to


    2011-06-27 08:37:00.182 [INFO] [] File not found [/usr/local/apache/htdocs/AAA]

    So it's using the default VirtualHost entry, which would explain why a litespeed restart would fix it. Where should I be looking to see if it reloaded the config after the VirtualHost entry?

    I have 15+ Litespeed servers, this is the only one not behaving, they are all on the same release, but this is the only one I enabled Caching on.
  7. webizen

    webizen Well-Known Member

    it looks like your server does not restart automatically to pick up new changes. make sure 'Reload on changes' is set to either 'Yes' or 'Use Apache binary wrapper'.
    Last edited: Jun 28, 2011
  8. optize

    optize Well-Known Member

    It is:

    Load Apache Configuration Yes
    Auto Reload On Changes Use Apache binary wrapper
    Apache Binary Path /usr/local/apache/bin/httpd
    Apache Configuration File /usr/local/apache/conf/httpd.conf

    This server has been in production more then a year and has worked fine. As soon as I upgraded to the latest version and enabled caching, things broke.
  9. mistwang

    mistwang LiteSpeed Staff

    please check /usr/local/cpanel/logs/safeapacherestart_log and /usr/local/lsws/logs/ap_cmd_param.log after adding/removing a domain. safeapacherestart_log shows when cPanel restart Apache. usually, cpanel wait up-to 1 minutes to apply new changes.
    You can try reverting back to 4.0.20 manually see if it can fix the problem.
  10. optize

    optize Well-Known Member

    Added an account at 10:39AM.


    [2011-06-28 04:12:31 -0700] info [safeapacherestart] Apache httpd is disabled, cannot be restarted


    Tue Jun 28 10:39:07 MST 2011: -k graceful
  11. mistwang

    mistwang LiteSpeed Staff

    Please make sure you do not disable Apache httpd service from WHM.
    It does look like LSWS restarts to apply the change, does the new account works?
  12. optize

    optize Well-Known Member

    The new account does not work.

    I can give you access to the server if it's easier to troubleshoot.
  13. optize

    optize Well-Known Member

    No go......
  14. mistwang

    mistwang LiteSpeed Staff

    sure. let us know then domain can be added/removed to reproduce this problem.
  15. optize

    optize Well-Known Member

    Ugh, I just added the test domain and it worked this time.

    Let me see if I can reproduce a broken domain, will let you know.

Share This Page