[horde] scripts and memory consumption

LALOT Dominique dom.lalot at gmail.com
Tue May 5 09:53:41 UTC 2009


Sorry to post another thread on that subject. I never receive my posts..(No
I haven't changed my postman prefs..)

Well,

running  horde/scripts/upgrades/migrate_user_categories.php for 750 accounts
leads to 64Mo

So I changed the loop for something very "light"

foreach ($users as $user) {
    echo 'Migrating prefs for ' . $cli->bold($user);

    // Set $user as the current user.
    $auth->setAuth($user, array(), '');
    $cli->writeln();
    continue;
...
}

What can we say, is that $auth->setAuth is just eating memory. In an http
request, it's not a problem, but inside a scrit, it is!
As I have 20000 accounts, you can compute how much memory we need.

And as it's the same loop in alarms.php and reminders.php running every X
minutes..
What could be the problem? I have no group driver in that test

Horde is 3.3.4, php 5.2.6

Is it a php Garbage Collector problem or cyclic references. How can we avoid
this?

Thanks

Dom

-- 
Dominique LALOT
Ingénieur Systèmes et Réseaux
http://annuaire.univmed.fr/showuser.php?uid=lalot


More information about the horde mailing list