Limit # of tries in the boost_async_opp() while loop
mikeytown2 - October 20, 2009 - 00:17
| Project: | Boost |
| Version: | 6.x-1.x-dev |
| Component: | Cron Crawler |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
Might time out due to odd php configurations.

#1
#2
that unlocked it.. thank you..
#3
now I am wondering what php config is off or what to watch out for..
#4
This issue is labeled as crawler, but i never got that far. this was fresh install, no cron, enable boost, go to config page and that was it...
#5
Code is in the crawler section, but it is used in the stats bock code (boost_stats_ajax_callback) and the save output to cache section (_boost_ob_handler) as well. As for why it's running on the 'boost settings' page thats really weird; or does it happen on anonymous only?
#6
#7
It would never let me logout.. would not let me go to home page, nothing.. locked
Had to close browser, clear browser cache, back to localhost page, try to open the site(front page), no luck(WSOD). Just sitting there with the browser loading .gif running.
and many times(use back button to get out), it locked up wamp and would net let me enter any of the 11 other sites I have in there.
I have been doing lots of stuff with this wamp install, photos, views, cck and all other testing, never gave any issues..
That is why i did a fresh drupal install, thinking it was something amiss in the database.
fresh install, enable admin menu, go straight to module list, enable boost, go straight to boost settings, done---
#8
@dbeall
Would you mind running it with this patch and uploading the boost-backtrace.txt file?
#9
well, that's a lot of stuff..
I didn't see this post till morning. sorry for the hold up.
This one is after the first patch adding the second patch.
#10
I tried loading the latest dev again-- (downloaded Oct/19) $Id: boost.module,v 1.3.2.2.2.5.2.195 2009/10/18 23:43:56 --and it locks up.
It did finally let me log out, 'shows access denied page'
But when I try to get to front page, it just hangs, endless browser loading .gif
PHP log
[20-Oct-2009 09:41:32] PHP Fatal error: Maximum execution time of 120 seconds exceeded in C:\wamp\www\Drupal6\includes\common.inc on line 620
[20-Oct-2009 09:43:32] PHP Fatal error: Maximum execution time of 120 seconds exceeded in C:\wamp\www\Drupal6\includes\common.inc on line 613
after waiting.... waiting.. finally gives me this error printed in browser:
Fatal error: Maximum execution time of 120 seconds exceeded in C:\wamp\www\Drupal6\includes\common.inc on line 613
Funny thing, it's not giving me the boost line 3086 error this time.
#11
i don't know any of this php stuff, but i tried this:
Deleted old backtrace file, used the code below, went back to localtoast site list, try to open the Drupal6 site (the bacaktrace file is generated at click -and it's the same as the one posted), browser hangs up, gives me this error:
Fatal error: Maximum execution time of 120 seconds exceeded in C:\wamp\www\Drupal6\includes\common.inc on line 620
function boost_async_opp($output, $wait = TRUE, $content_type = "text/html", $length = 0) {
$length = ($length == 0) ? (strlen($output)-1) : $length;
// Prime php for background operations
$loop = 0;
ob_start();
debug_print_backtrace();
$trace = ob_get_contents();
ob_end_clean();
file_put_contents('boost-backtrace.txt', $trace, FILE_APPEND);
while (ob_get_level()) {
ob_end_clean();
$loop++;
}
#12
Interesting _boost_ob_handler() is being called which gets called only if user is empty. Your saying php timed out when logged in?
boost_init() {
<?php// We only generate cached pages for anonymous visitors.
if (empty($user->uid)) {
if (BOOST_ENABLED != CACHE_AGGRESSIVE) {
$GLOBALS['conf']['cache'] = CACHE_DISABLED;
}
$GLOBALS['_boost_cache_this'] = TRUE;
register_shutdown_function('_boost_ob_handler');
ob_start();
}
?>
try this patch, let me know what happens.
#13
before i wait for this to make up it's mind..
which .module file do you want me to use?
the dev from Oct 18th
it gives me
Fatal error: Maximum execution time of 120 seconds exceeded in C:\wamp\www\Drupal6\includes\common.inc on line 613
#14
doesn't matter
#15
won't let me in the front page
going to re patch the file and go again..
#16
so that doesn't work then... try this patch
#17
I am using this function with the last patch... not loading
Fatal error: Maximum execution time of 120 seconds exceeded in C:\wamp\www\Drupal6\includes\common.inc on line 613
Should i switch back to the < 25 patch?
// Prime php for background operations
while (ob_get_level()) {
ob_end_clean();
}
-----------------------
original issue was just after installing the module..
right now i am just trying to get in the site, the module is installed..
not sure how this test should be run
#18
if i use 609030.patch it works against dev
#19
Trying to prevent _boost_ob_handler() from being called, or if it was called incorrectly, exit out. Original patch is what you call a hack, works, but doesn't fix the underling issue. But I'm sorta out of sane ideas at the moment so I'll put the hack in and call it a day.
#20
ok, I will do any testing you want when the time comes, long as I know the right way to test...
#21
committed
#22
Automatically closed -- issue fixed for 2 weeks with no activity.