We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46058
    • 2 Posts
    One of our sites occasionally has a problem where it seems to build the file cache only partially or in correctly.. it's happened twice within the last 15 days. I'm trying to determine a cause.. but I'm not having any luck.

    We're using version 2.2.10-pl on centos 6, php 5.3.3, apache 2.2.15, mysql 5.1.69.

    The symptoms have varied slightly.. the first time it happened, images in articles didn't display. Clearing the cache in the manager fixed it. Second time, the styling for the home page went way and content .. again clearing the cache fixed it.

    In the web logs, I can see where the site.css was being loaded by clients... then clients stopped requesting it.. and kept hitting the home page over and over (because they couldn't make it to any other page in the site). .. I can also see that no one was in the manager at the time (last person was out 3 hours prior to the problem starting).

    There are no errors in the weblogs, and no errors (or even recent messages) in the site error.log. The only thing of a little interested is we were getting indexed by msnbot at the time.. but that happens about every 30 minutes (along with some others), so it's probably unrelated to the problem.

    Is there some sort of debugging that it would be worth turning on that would show if there was a problem when the site rebuilds the cache?

    Thanks

    This question has been answered by opengeek. See the first response.

    • discuss.answer
      • 22303 MODX Staff
      • 10,725 Posts
      A corrupt cache file is possible on a platform where flock is disabled or is ineffective due to isolated process threads (some FastCGI configurations) when multiple requests attempt to write the cache file the first time. But this theoretically can only occur after the cache is cleared, if multiple requests hit the Resource for the first time before the first one can write the cache file. If no one was working in the manager (and those files were already cached), and you do not have a cache_expires Setting configured to anything other than 0, this should not be occurring. If you do not have a cache_expires value other than 0 (for any cache partition) and you are still experiencing this behavior, we need to investigate why the cache file would even get generated, let alone written incorrectly, if it already exists.
        • 46058
        • 2 Posts
        Thanks, that bit of info got me digging a bit deeper into the logs (looking at patterns of file requests and file sizes) and it's possible that the problems actually began 12 hours earlier ... although I might just be seeing ghosts.. I'm pretty sure we would have heard from someone in that time frame before discovering it ourselves.

        Our cache_expires setting is set to 0.

        Next time this happens I'll make a copy of the cache folder before clearing it.. at least that way I can do a diff of the two and maybe have that point me in the right direction.

        I'll go ahead and flag this as solved ... I have enough info/direction at this point. I don't expect to be able to dig into it any more until it breaks again (if it ever does).

        Thanks again