For some reason, after running the cache for a while, the index.html file in the cache directory turns to a 54bytes empty file and the site goes dead.

It has something to do with the boosted.txt new .htaccess file, since restoring it to the old one produces the right index.html again. I really can't say what causes this to happen.

I run the latest CVS.

Any ideas?


Arto’s picture

Title: index.html turns to null (54bytes) » index.html turns to null (54 bytes)
Component: Code » Apache integration
Assigned: Unassigned » Arto

No immediate ideas as to what could cause this. Could you attach the 54-byte file, please, if you still have it - if not, do you recall what the contents were?

fiLi’s picture

Yeah, sure. It was easily replicated. I put back the new boosted.txt and ran a cron job and the new index.html and search.html only include (without any other text):


The weird thing is that other files are just fine, created and brought up as they should. Is there something special that happens to index.html and search.html on cron jobs?

fiLi’s picture

Oppps... it's code so it didn't show up:

<!-- Page cached by Boost at 2006-11-26 23:48:05 -->

Arto’s picture

Title: index.html turns to null (54 bytes) » Cached index.html file is empty after cron run
Version: » 4.7.x-1.x-dev
Component: Apache integration » Code
Status: Active » Fixed

While I've yet to run into this problem myself, I strongly suspect it is being caused by the page caching code running erroneously when cron is invoked. Cron runs should only expire stale files from the cache directory, never create them.

I've added a couple sanity checks, so this problem should be fixed by CVS commit #46456. Please let me know how it works for you.

On an unrelated note, I've added an SQL statement to the Boost installation hook to ensure correct interaction with other modules that make use of PHP's output buffering. You would need to run this once, manually, on your database:

UPDATE system SET weight = -90 WHERE name = 'boost';

(I didn't make it an explicit upgrade hook since this is alpha and you are the only known brave user at this point. Apologies ;-))

Anonymous’s picture

Status: Fixed » Closed (fixed)