How often is WP Cron being called on your site?
Thread Starter
toyNN
(@toynn)
To test I set the Cache Preload to be every 60seconds and 2 pages.
Accessing the site once every 60+ seconds I see in the site logs that WP Cron gets fired every time. The 2 pages from the sitemap are pulled but never written out to disk.
71.101.xx.xx - - [23/Jul/2011:19:08:35 -0700] "GET /ann/page/3/ HTTP/1.0" 200 54019
10.101.34.xx - - [23/Jul/2011:19:08:35 -0700] "POST /wp-cron.php?doing_wp_cron HTTP/1.0" 200 -
10.101.34.xx - - [23/Jul/2011:19:08:35 -0700] "GET /sitemap.xml HTTP/1.1" 200 103535
10.101.34.xx - - [23/Jul/2011:19:08:35 -0700] "GET / HTTP/1.1" 200 72325
10.101.34.xx - - [23/Jul/2011:19:08:38 -0700] "GET /2010/largest-water-fountain-at-national-stadium/ HTTP/1.1" 200 39760
71.101.xx.xx - - [23/Jul/2011:19:09:36 -0700] "GET /ann/page/2/ HTTP/1.0" 200 54849
10.101.34.xx - - [23/Jul/2011:19:09:36 -0700] "POST /wp-cron.php?doing_wp_cron HTTP/1.0" 200 -
10.101.34.xx - - [23/Jul/2011:19:09:36 -0700] "GET /sitemap.xml HTTP/1.1" 200 103535
10.101.34.xx - - [23/Jul/2011:19:09:36 -0700] "GET /2010/drama-kinkyuu-special-review/ HTTP/1.1" 200 38392
10.101.34.xx - - [23/Jul/2011:19:09:37 -0700] "GET /2010/odagiri-joe/ HTTP/1.1" 200 36612
toyNN,
I’ve experienced a similar problem with cache preload and I came up with my own PHP solution… If you wish to check it out:
http://www.pixelenvision.com/1572/php-cache-warmer-preloader-for-w3-total-cache/
Thread Starter
toyNN
(@toynn)
Your script looks promising and definitely something I’d thought about too since the W3TC pre-load only fires with other WP activity (when its working). If I have any further thoughts I’ll comment over on your post.
@pixelenvision
thanks for the code. having the same issue and it would be cool if this is implemented into the actual plugin?
anyway, going to try it out… anyone know of problems with this mod and the current w3 total cache version?
Thread Starter
toyNN
(@toynn)
Actually I did take pixelEnvision’s code which was an excellent start. One of the key features he made I think is the pause-governor – super helpful for low powered hosting (like EC2 micro-instance). I ran with his code and modified, adding parameterized options for number of pages, pause time, and logging so it can be flexibly called via a CRON job. Made some other changes in the logic, the page returned of the cache prime results, and an incomplete effort to add a way to change how priority is given to caching pages.
I’ve got it set for 20pages with 1sec pause every 10min over one of my sites http://www.comtrya.com
Using a CRON job so it will run on its own schedule. For me the cache priming is needed since the site isn’t high-traffic and on shared host/lower power server. I personally don’t like the plugin route for the cache priming since it would run only when someone or Googlebot hits the site and adding a large burden of caching the additional pages during those views.
This is fixed in the next release.
Hey Frederick,
is this problem already solved, i think i still have the same problem?