Somewhere we're storing things we shouldn't be storing.

( ! ) Fatal error: Allowed memory size of 104857600 bytes exhausted (tried to allocate 1572864 bytes) in /Users/robert/Sites/d6solr/includes/database.mysqli.inc on line 144
Call Stack
#	Time	Function	Location
1	0.0002	{main}( )	../cron.php:0
2	0.1043	drupal_cron_run( )	../cron.php:11
3	0.1052	module_invoke_all( )	../common.inc:2533
4	0.1368	call_user_func_array ( )	../module.inc:471
5	0.1368	search_cron( )	../module.inc:0
6	0.1372	module_invoke( )	../search.module:284
7	0.1372	call_user_func_array ( )	../module.inc:450
8	0.1372	apachesolr_update_index( )	../module.inc:0
9	0.1372	ApacheSolrUpdate::update_index( )	../apachesolr_search.module:14
10	257.4466	node_invoke_nodeapi( )	../apachesolr.module:211
11	257.4466	comment_nodeapi( )	../node.module:670
12	257.4472	check_markup( )	../comment.module:619
13	257.4473	cache_get( )	../filter.module:429
14	257.4482	db_fetch_object( )	../cache.inc:26
15	257.4482	mysqli_fetch_object ( )	../database.mysqli.inc:144

This happens after indexing 9,000 nodes.

Comments

robertdouglass’s picture

Needs to be evaluated for 1.0 release.

JacobSingh’s picture

Status: Active » Postponed (maintainer needs more info)

My guess is this:

$node = node_load($row->nid);

if ($node->nid) {
// Build the node body.
$node = node_build_content($node, FALSE, FALSE);

AFAIK, this will cache each node object in drupal's node_load static cache. Can you try it like this:

node_load($nid,null,true);

robertdouglass’s picture

Ah! Good catch. I'll add that.

robertdouglass’s picture

Status: Postponed (maintainer needs more info) » Fixed
      // Set reset = TRUE to avoid static caching of all nodes that get indexed.
      $node = node_load($row->nid, NULL, TRUE);

Note that the param is reset=TRUE if you want to kill the cache.

Marking fixed for now until we hear otherwise.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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