Exhausts PHP memory limit on big sites

budda - April 1, 2009 - 15:21
Project:Search and Replace
Version:5.x-1.1
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description

The way you are loading each node in is creating a huge static array of cached node objects. This eventually gets full and kills the module from processing any further.

You need to change your node_load() so that it resets the internal function cache on every call. Use:
$node = node_load($val['nid'], NULL, TRUE);

I noticed this in 5.x version, but your code hasn't changed in the 6.x version from checking CVS.

Hope it helps.

#1

btopro - April 24, 2009 - 02:38

interesting... I'm not near my CVS stack at the moment but I'll try to fix this soon, thanks for the tip. D6 branch was screwed up which was why you saw that.

 
 

Drupal is a registered trademark of Dries Buytaert.