I've run into the following problem sporadically on different sites we
have running on top of Cake: A client will report in that some page or
other isn't loading, when it's examined the page will be a blank
screen. Turning on debug will give a PHP syntax error in the cached
file in app/tmp/cache/views/. It appears that the file was not
completely written to disk, and therefore is invalid. Deleting that
file fixes the problem.

I'm not sure how these files are becoming corrupted, though. The
problem seems mostly random, but it is tied in to server load. When
the server is heavily loaded this will happen more frequently. Today a
client reported a problem again. The cached file had been created at
2:25AM, but there were records in the DB created closer to noon that
couldn't have been created if that page were broken.

Some additional details: the sites that have this problem are running
a custom CMS we've written on top of Cake. This makes use of a
modified version requestAction() to load parts of a page. I'm not sure
if that could have an effect or not. The cache files generated are
enormous as well, so scanning through them to see how they work hasn't
done me much good. I don't know if that's typical of Cake or specific
to our CMS.

Has anyone else experienced a problem like this? Searching for
"corrupted cache" in this group doesn't return anything that seems
directly related, nor does searching for "cakephp corrupted cache" in
google. I'm still a bit unclear on exactly how Cake's caching works
under the hood, but at a surface level the caching works except for
when the files themselves are busted.

Any ideas on how to prevent or detect this? Ideally I'd rather this
didn't happen, but if I can at least prevent things from needing a
user to contact our client that a page is down and then have the
client contact me that would be a significant improvement.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to