Drupal 4.7.6
Acidfree 4.7.x-1.0 (/* $Id: acidfree.module,v 1.62.2.60 2007/01/23 06:10:34 vhmauery Exp $ */)

I have been running acidfree on a high-traffic, high membership ship for several months now, so thank you so much for the work you've put in on this useful module. I noticed a few weeks ago, however, that acidfree was no longer working.

First, any acidfree album always came up empty.
Second, it was impossible to call /node/add/acidfree successfully

The server gives up during the processing of this call. The error I get is
PHP Fatal error: Maximum execution time of 180 seconds exceeded in
/www/mtv/dev/docs/afterellen.com/modules/acidfree/acidfree.module on
line 1259

My max memory is set to 128 mb, which is HUGE, and my maximum execution time is set to 180 seconds, also far longer than most.

I added some error_log output to the function call where the error was happening (line 1259 is where the $tree= array_merge happens), and noticed that it took 1 minute and 40 seconds before any log output started appearing. Once it did, I saw that this function was called 6404 times before the script timed out. It seemed to be able to perform between 5-8 array_merge operations per second.

//my commented version of the function
function acidfree_get_album_tree(&$node, $depth=0) {
$tree = Array();
if (!isset($node->nid))
return $tree;
$children = _acidfree_get_children($node, -1, 0, "class = 'album'");
error_log("acidfree: we have ".count($children)." children");
$tree[] = $node;
foreach ($children as $child) {
$child->depth = $depth;
error_log("acidfree: merging array with depth $depth");
$tree = array_merge($tree, acidfree_get_album_tree($child, $depth + 1));
}
error_log("acidfree: tree now has ".count($tree)." elements");
return $tree;
}

The odd thing is that the tree, throughout all the iterations, only reported back a depth of 1 element, and there were always 0 children, for each one.

Looking at other bug reports here, I made sure there was only one root album (only one instance of a -1 parent in acidfree_hierarchy).

I'm wondering if we simply have maxed out the capabilities of this module (over 7400 individual acidfree albums), or if there's something else that has gone wrong.

Is the 4.7 still in maintenance mode? Possible to get this looked at. It's hard to upgrade a pro-level site at the drop of a hat. We are months from being able to move to Drupal 5.

Comments

apotek’s picture

By the way, I see all response to 4.7. is closed. Wow. Do you really think any serious site can just move to acidfree 5 at the drop of a hat? Drupal 5 has only been out six months.

apotek’s picture

I might add, too, that there isn't even any official, stable, production quality release of acidfree 5, and yet the 4.7 branch has been closed for comments? Unbelievable.

nancydru’s picture

Not at the drop of a hat, no. It took me 3 months - part of that because of the AF status.

And, BTW, version 6 should be out in less than another 6 months.

vhmauery’s picture

Status: Active » Closed (duplicate)

@klktrk,

If you would like you give me a full-time salary for working on Acidfree, I would have more than enough time to keep 4.7 alive while I work on a complete re-write of Acidfree for Drupal 5 and make preparations for Drupal 6.

Please be patient. I am a volunteer here and only have a few hours each week to work on Acidfree. Frankly, I couldn't care less about your production site (or anyone else's). I am doing this for fun. I won't be pressured or cajoled into doing things because anyone else wants me to.

As for 4.7's current status, I think security fix only mode seems reasonable. Acidfree 5 is fairly stable, but still waiting for Image module and Video module to settle down.

I am sorry you ran into what looks like scalability issues. I am somewhat surprised that Acidfree scaled as well as it did. It was not written to be a commercial product. Its primary purpose was to give me an easy way to share pictures of my kids with my family.

This issue has been raised only once before (http://drupal.org/node/115728) and was resolved with a won't fix status. But that issue does have a patch attached that might help your situation. Give it a shot and let me know if it helps. Post any responses to the other issue since I am marking this as a duplicate.

apotek’s picture

Thanks for the response. I accept the chastisement. Tried the patch, but no joy there either. closed closed closed.