Assuming you are using 1.8.3, try moving this code:
PHP Code:
if (memory_get_usage() + 1000000 > 3000000) {
return array('tempfile'=>0,'tempfilesize'=>0);
}
to be right after the following in the robot_functions.php file:
PHP Code:
// $file_content = @file($uri); /////////////////////////////////////////////////