Cache stop caching after some hours... Works again after openlitespeed restart

Discussion in 'General OpenLiteSpeed Discussion' started by capvar, Apr 24, 2017.

  1. capvar

    capvar New Member

    I face a strange problem. I have a CentOS - openlitespeed host with 3-4 wordpress virtualhosts.
    Everything is working good (caching, etc) at the beginning. After some time (hours) cache stop hitting (it works perfectly before). It's like no caching is enabled.
    I go to admin panel, restart litespeed and everything works fine for some hours. Problem occures repeatevly.
    Any suggestions?
  2. lsfoo

    lsfoo Administrator

    Hi @capvar

    Could you run df -h and df -i in the terminal?

    It's possible that you're running out of disk space.
  3. capvar

    capvar New Member

    Doesn't seem as free space problem :(
  4. capvar

    capvar New Member

    I post the response headers below
    1. Before restarting openlitespeed (after several hours before service start)

    2. After restarting openlitespeed (working as expected)

  5. lsfoo

    lsfoo Administrator

    Could you pm me the error log?

    Also, is it repeated cache not working after a few hours? The cache is meant to invalidate (according to your settings, at 1800 seconds), so the first request after it is invalidated will be a cache miss. The following ones should be a hit.
  6. capvar

    capvar New Member

    Its not an invalidation thing, I hit F5 several times on the same page to ensure it's cached (or should be cached in our case), or navigate between two pages several times and wait for the response time to reduce (never does before restarting openlitespeed service).

    Same procedure after restart is working perfectly.

    Do you think increasing 1800 seconds to 3 hours is a good practice?
  7. lsfoo

    lsfoo Administrator

    I see. I have a comment about the log, but I will just reply to you in the conversation about it.

    Regarding the invalidation time, it is entirely dependent on how your site is set up. If you are using the wordpress cache plugin (response headers indicate that you are), our plugin knows when to invalidate pages (e.g. blog edits, new posts, etc.), so really there's no reason for it to be set to less than a day once everything is working correctly. In the plugin version 1.0.15, we actually increased the default TTL to 1 week.

Share This Page