I receive this error on dblog when cron is executed: "Expired stale files from static page cache".
Could anyone tell me what this message means and how can it be prevented?

Comments

bboybenny’s picture

I am getting that msg too every time cron is executed, please help. Thanks.

rogeriodec’s picture

Are you trying to run cron.php, outside of Drupal (via cPanel)?

n20’s picture

Yes, i do run cron via cpanel and get that message also every time cron runs.
Expired 0 stale files from static page cache.

rogeriodec’s picture

As I abandoned Boost module in favor of Advanced CSS/JS Aggregation I could not tell you if the following solution would work for you, however I think if you look at the topic http://drupal.org/node/1484456 I created about solutions to cron (especially #12) perhaps this may solve your problem.

bgm’s picture

Status: Active » Fixed

It's a watchdog notice, not an error:

  // Expire old content
  if (!BOOST_LOOPBACK_BYPASS && variable_get('boost_expire_cron', TRUE) && $expire && boost_cache_expire_all()) {
    if (BOOST_VERBOSE >= 5 && isset($_boost['verbose_option_selected']['boost_cron_expire'])) {
      watchdog('boost', 'Expired stale files from static page cache.', array(), WATCHDOG_NOTICE);
    }
  }

You can reduce your Boost debug verbosity level to silence the message.

n20’s picture

Yes, you could disable the setting to delete all expired files on cron run. but then the files wont be deleted. lets assume you run cron every minute - this gives you one extra sql-query per minute for the watchdog notice even no files deleted.

we are here in an discussion about the 6.x version. in 7.x version im talking about the code looks like:

if (isset($_boost['base_dir']) && variable_get('boost_expire_cron', BOOST_EXPIRE_CRON)) {
    $count = _boost_rmdir($_boost['base_dir'], FALSE);
    watchdog('boost', 'Expired %count stale files from static page cache.', array('%count' => $count), WATCHDOG_NOTICE);
  }

may im wrong, but wouldnt it better to have it something like that:

if (isset($_boost['base_dir']) && variable_get('boost_expire_cron', BOOST_EXPIRE_CRON)) {
    $count = _boost_rmdir($_boost['base_dir'], FALSE);
    if ($count >= 1) {
      watchdog('boost', 'Expired %count stale files from static page cache.', array('%count' => $count), WATCHDOG_NOTICE);
    }
  }

only if files arre really removed you get the notice.

not sure about the 6.x version...

n20’s picture

i created a new issue for the 7.x version here: http://drupal.org/node/1807186

cheers, N20

Anonymous’s picture

The general scenario is this. The site administrator sets up cron to run hourly/ daily, the pages are set up to expire weekly. He/ She checks the logs and see that boost is running even if it's not expiring anything. If something breaks, then the dblog provides a trail as to when it stopped working, even expiring 0 pages.

Another example from a debugging POV, the dblog states that 0 pages have been expired but the pages in the cache are older than a week, so something is wrong and the 0 pages has pointed that out etc...

n20’s picture

good point. the _boost_rmdir() does not provide any logging if something goes wrong... as far as i can see.

however, there is some kind of check if boost is "up and running" at: admin/reports/status
not sure whats underlying this check.

Anonymous’s picture

I believe the status report is very dismissive :-) Yep, you've got boost installed, it should be working if properly configured.

I'm (newest member) working through the back issues to clear down the queue then I'm going to have a hard look at status updates for boost, because a lot of issues are non-specific with no means of debugging. Some also seem to be features by design so I need to work on the documentation.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.