? boost-567748.patch
? boost-577578.patch
Index: boost.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/boost/boost.module,v
retrieving revision 1.3.2.2.2.5.2.140
diff -u -p -r1.3.2.2.2.5.2.140 boost.module
--- boost.module	12 Sep 2009 06:03:03 -0000	1.3.2.2.2.5.2.140
+++ boost.module	16 Sep 2009 08:32:01 -0000
@@ -69,11 +69,11 @@ define('BOOST_CHECK_BEFORE_CRON_EXPIRE',
 define('BOOST_CRAWL_ON_CRON',        variable_get('boost_crawl_on_cron', FALSE));
 define('BOOST_CRAWLER_THROTTLE',     variable_get('boost_crawler_throttle', 0));
 define('BOOST_CRAWLER_THREADS',      variable_get('boost_crawler_threads', 2));
-define('BOOST_CRAWLER_BATCH_SIZE',   variable_get('boost_crawler_batch_size', 25));
+define('BOOST_CRAWLER_BATCH_SIZE',   variable_get('boost_crawler_batch_size', min(15, ini_get('max_execution_time')/(2 * boost_average_time()))));
 define('BOOST_CRAWL_URL_ALIAS',      variable_get('boost_crawl_url_alias', FALSE));
 global $base_url;
 define('BOOST_CRAWLER_SELF',         $base_url . '/' . 'boost-crawler?nocache=1&key=' . variable_get('boost_crawler_key', FALSE));
-define('BOOST_MAX_THREAD_TIME',      1.5 * boost_average_time() * BOOST_CRAWLER_THREADS * BOOST_CRAWLER_BATCH_SIZE);
+define('BOOST_MAX_THREAD_TIME',      max(300, 2 * boost_average_time() * BOOST_CRAWLER_THREADS * BOOST_CRAWLER_BATCH_SIZE));
 define('BOOST_MAX_THREADS',          8);
 
 // This cookie is set for all authenticated users, so that they can be
@@ -97,6 +97,7 @@ define('BOOST_USER_ID',              @$G
 //$GLOBALS['_boost_cache_this'] = '';
 //$GLOBALS['_boost_max_execution_time'] = '';
 //$GLOBALS['_boost_output_buffering'] = '';
+//$GLOBALS['_boost_default_socket_timeout'] = '';
 
 //////////////////////////////////////////////////////////////////////////////
 // Core API hooks
@@ -2558,8 +2559,12 @@ function boost_async_opp($output) {
 function boost_async_call_crawler($self, $this_thread = NULL, $total_threads = NULL) {
   $self .= isset($this_thread) ? '&thread=' . $this_thread : '';
   $self .= isset($total_threads) ? '&total=' . $total_threads : '';
+  $GLOBALS['_boost_default_socket_timeout'] = ini_get('default_socket_timeout');
 
+  ini_set('default_socket_timeout', 3);
   boost_drupal_http_request($self);
+  ini_set('default_socket_timeout', $GLOBALS['_boost_default_socket_timeout']);
+
   ini_set('max_execution_time', $GLOBALS['_boost_max_execution_time']);
   ini_set('output_buffering', $GLOBALS['_boost_output_buffering']);
 }
