Cached index.html file is empty after cron run

fiLi - November 26, 2006 - 21:38
Project:Boost
Version:4.7.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Arto
Status:closed
Description

Hi,

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?

#1

Arto - November 26, 2006 - 22:00
Title:index.html turns to null (54bytes)» index.html turns to null (54 bytes)
Component:Code» Apache integration
Assigned to:Anonymous» 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?

#2

fiLi - November 27, 2006 - 04:54

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?

#3

fiLi - November 27, 2006 - 04:57

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

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

#4

Arto - November 27, 2006 - 16:48
Title:index.html turns to null (54 bytes)» Cached index.html file is empty after cron run
Version:<none>» 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 ;-))

#5

Anonymous - December 11, 2006 - 17:01
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.