Due to the late page cache, having a spurious entry in the page cache for 'cron.php' can prevent cron from working.
If for any reason you rename cron.php temporarily, and something hits it as anonymous while it is not there, it will cause a page cache entry for 'cron.php' to be stored due to the 404 handling procedure.
After moving it back, cron.php will continue to return 404s during bootstrap due to the late page cache.
This probabaly also affects xmlrpc.php and any third party handlers.
(If a way was discovered to cause this entry to be stored without having to move the file first, this would be a pretty serious issue. Leaving at critical until this can be investigated more thoroughly...)
[11:40] <cornernote> so it is crapping itself at phase 5
[11:40] <Bdragon> 404's usually come while running the menu handler, but that shouldn't happen for cron.php
[11:41] <Bdragon> Because index.php is responsible for it
[11:41] <cornernote> DRUPAL_BOOTSTRAP_LATE_PAGE_CACHE
[11:41] <cornernote> thats where it gets too...
[11:42] <Bdragon> Hmm...
[11:42] <Bdragon> Did you remove cron.php and then try to visit it as anonymous?
[11:43] <Bdragon> There could be a spurious cache entry
[11:43] <Bdragon> Try truncating the page cache
[11:44] <Bdragon> If this fixes it, I know exactly what's happening...
[11:44] <cornernote> it just magically fixed itself
[11:44] <Bdragon> yeah
[11:45] <cornernote> but i got it down to 2 lines.. either this:
[11:45] <cornernote> $conf = variable_init(isset($conf) ? $conf : array());
[11:45] <cornernote> or this: _drupal_cache_init($phase);
[11:45] <Bdragon> It would be #2.
[11:45] <Bdragon> Here's what's happening:
[11:46] <Bdragon> At some point, you attempted to visit cron.php as anonymous when it had been renamed or moved.
[11:47] <Bdragon> When a file is not found, the webserver tries again by rewriting it to index.php?q=(requested file..)
[11:47] <Bdragon> This causes a normal drupal startup.
[11:47] <Bdragon> Drupal attempts to find a menu handler for cron.php
[11:47] <Bdragon> This doesn't exist.
[11:48] <Bdragon> Drupal returns a 404 and adds a page cache entry to match.
[11:48] <Bdragon> NOW, you move cron.php BACK.
[11:48] <Bdragon> Next time you try to call cron.php, it actually runs cron.php
[11:48] <Bdragon> BUT, cron.php does a full bootstrap
[11:49] <Bdragon> A full bootstrap involves the late page cache check.
[11:49] <cornernote> i am on dreamhost, and they have a nasty habbit of killing scripts... usually most issues i blame on that... rekon that could have caused it ?
[11:49] <Bdragon> The cache happens to have a stored entry for cron.php
[11:49] <Bdragon> The system returns this result and aborts the bootstrap
[11:50] <Bdragon> So, the result is, despite not even using the menu system, the bootstrap returns 404
[11:50] <cornernote> i think DH tinker with sites when servers we under load.. i think they did it
[11:50] <Bdragon> Possibly
[11:50] <Bdragon> So, this is a bug in Drupal.
[11:50] <cornernote> so... now i fully understand the problem
[11:51] <Bdragon> Cron.php should not be bootstrapping that far
[11:51] <cornernote> now, to prevent this from recuring... can i just delete that page from cache once per day with an external php script ?
[11:51] <Bdragon> No, change cron.php to not DRUPAL_BOOTSTRAP_FULL
[11:52] <Bdragon> Should go to DRUPAL_BOOTSTRAP_SESSION, I reckon
[11:53] <Bdragon> The further steps are only relevant for index.php invoked bootstraps
[11:54] <cornernote> that gives me: Call to undefined function drupal_cron_run()
[11:57] <Bdragon> ahh, there's the problem...
[11:57] <Bdragon> Yeah, it isn't pulling in common.inc until the last part...
[11:57] <Bdragon> Damn...
[11:58] <cornernote> shouldnt the cache handler check for things like caching the cron.php page ?
[11:58] <Bdragon> Yeah... That might be a good idea.
[11:58] <Bdragon> page_get_cache?
[11:58] <Druplicon> page_get_cache: Retrieve the current page from the cache. => page_get_cache() => http://api.drupal.org/api/5/function/page_get_cache
[11:58] <Bdragon> Should be ensuring that the handler is index.php....
[12:00] <Bdragon> I'll bugreport it
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 177790-dont-use-cache-on-technical-pages_0.patch.
[ View ]
|#26||177790-dont-use-cache-on-technical-pages.patch||3.74 KB||Damien Tournoud|
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 177790-dont-use-cache-on-technical-pages.patch.
[ View ]