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

mikeytown2 - October 20, 2009 - 00:19
Status:active» needs review
AttachmentSize
boost-609030.patch 810 bytes

#2

dbeall - October 20, 2009 - 00:25

that unlocked it.. thank you..

#3

dbeall - October 20, 2009 - 00:29

now I am wondering what php config is off or what to watch out for..

#4

dbeall - October 20, 2009 - 00:33

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

mikeytown2 - October 20, 2009 - 00:55

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

mikeytown2 - October 20, 2009 - 00:58
Status:needs review» reviewed & tested by the community

#7

dbeall - October 20, 2009 - 01:13

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

mikeytown2 - October 20, 2009 - 01:20

@dbeall
Would you mind running it with this patch and uploading the boost-backtrace.txt file?

AttachmentSize
boost-609030.1.patch 996 bytes

#9

dbeall - October 20, 2009 - 13:15

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.

AttachmentSize
boost-backtrace.txt 5.29 KB

#10

dbeall - October 20, 2009 - 13:53

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

dbeall - October 20, 2009 - 14:34

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

mikeytown2 - October 20, 2009 - 18:25

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.

AttachmentSize
boost-609030.1.patch 725 bytes

#13

dbeall - October 20, 2009 - 19:04

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

mikeytown2 - October 20, 2009 - 19:04

doesn't matter

#15

dbeall - October 20, 2009 - 19:12

won't let me in the front page

going to re patch the file and go again..

#16

mikeytown2 - October 20, 2009 - 19:11

so that doesn't work then... try this patch

AttachmentSize
boost-609030.2.patch 1.35 KB

#17

dbeall - October 20, 2009 - 19:18

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

dbeall - October 20, 2009 - 19:25

if i use 609030.patch it works against dev

#19

mikeytown2 - October 20, 2009 - 19:28

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

dbeall - October 20, 2009 - 19:30

ok, I will do any testing you want when the time comes, long as I know the right way to test...

#21

mikeytown2 - October 21, 2009 - 01:25
Status:reviewed & tested by the community» fixed

committed

#22

System Message - November 4, 2009 - 01:30
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.