I have searched and couldn't find any info on this, so hopefully Im not asking a question already covered.

I was using boost alpha 2, upgraded to 3 last night. I checked my logs and now I am getting a error for every page there is. (This wasn't happening with alpha 2)

I also made sure to update my .htaccess file after the update as well.

2 errors for each.

Type boost
Date Saturday, May 2, 2009 - 9:37am
User Anonymous
Location http://www.pcwintech.com/how-tos
Referrer http://www.pcwintech.com/basic-information
Message Unable to write file: cache/www.pcwintech.com/how-tos.html
Severity emergency

and

Type php
Date Saturday, May 2, 2009 - 9:37am
User Anonymous
Location http://www.pcwintech.com/how-tos
Referrer http://www.pcwintech.com/basic-information
Message file_put_contents(cache/www.pcwintech.com/how-tos.html) [function.file-put-contents]: failed to open stream: No such file or directory in /home/**removed**/pcwintech.com/sites/all/modules/boost/boost.module on line 532.

(**removed** is by me for this post)

But when I check the cache dir all the files it is complaining about are there.
The boost block shows the pages are working right and when I check the source of a page as anonymous I am getting

So it seems boost is working. So I cant explain why now with the new version im getting a log entry for every page!

Any guidance would be great. Thanks again.

Comments

shane_croft’s picture

Title: Many log enties with boost » Many log entries with boost

sorry the last part didn't post right, here it is again.

But when I check the cache dir all the files it is complaining about are there.
The boost block shows the pages are working right and when I check the source of a page as anonymous I am getting
Page cached by Boost @ 2009-05-02 09:12:31, expires @ 2009-05-02 10:12:31

So it seems boost is working. So I cant explain why now with the new version im getting a log entry for every page!

Any guidance would be great. Thanks again.

mikeytown2’s picture

Interesting error... It's throwing an error for every cached page generation.
PHP Version?

The reason it's working is because the gzipped pages are being served. The normal html pages are not being generated.
This is failing

      if (file_put_contents($filename, $data) === FALSE) { //line 532
        watchdog('boost', 'Unable to write file: %file', array('%file' => $filename), array(), WATCHDOG_WARNING);
      }

This is working

        if (file_put_contents($gz_filename, gzencode($data,9)) === FALSE) { //line 540
          watchdog('boost', 'Unable to write file: %file', array('%file' => $gz_filename), array(), WATCHDOG_WARNING);
        }

I would have guessed the gzip would be failing, because that's the new code. Anyway here are some guesses as to why this is failing for you.

  • Old Symlinks are interfering with file creation. FTP in and del the www.pcwintech.com dir from your cache dir. #337364: _boost_rmdir_rf doesn't delete symlinks. Let me know if clearing the dir via ftp fixes this. If so then I need to include this patch, even though its outdated.
  • You encountered a race condition when it came to writing the files #223610: Race condition in cache file creation
  • File/Dir permissions are off. Should be 775.
  • Symlinks are no longer used, you might have set some funny settings on your server, that is now outdated.
  • Your using php4
shane_croft’s picture

Thanks for the reply.

This is my current setup

Drupal 6.11
Access to update.php Protected
CAPTCHA Already 323 blocked form submissions
Configuration file Protected
Cron maintenance tasks Last run 3 hours 53 min ago
You can run cron manually.
Database updates Up to date
Drupal core update status Up to date
File system Writable (public download method)
GD library bundled (2.0.34 compatible)
Module and theme update status Up to date
MySQL database 5.0.67
PHP 5.2.6
PHP memory limit 90M
PHP register globals Disabled
Unicode library PHP Mbstring Extension
Update notifications Enabled
Web server Apache/2.2.11 (Unix) PHP/5.2.6 mod_ssl/2.2.11 OpenSSL/0.9.8c mod_fastcgi/2.4.6 Phusion_Passenger/2.1.2

boost puts bith html and gz files here are the 2 locations
/pcwintech.com/cache/gz/www.pcwintech.com/
/pcwintech.com/cache/www.pcwintech.com/

I logged into ftp and deleted all the cache files and dir. so far I havent seen any more errors. I will keep an eye on it and see if the problem continues. Thanks for the help.

mikeytown2’s picture

Title: Many log entries with boost » Many log entries with boost - stale symlinks
Status: Active » Closed (duplicate)