[horde] scripts and memory consumption
Jan Schneider
jan at horde.org
Fri May 8 13:34:46 UTC 2009
Zitat von LALOT Dominique <dom.lalot at gmail.com>:
> 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?
If we knew the answer we would fix it. Since this is only a problem
with very large installations and long running scripts, do we really
expect too much that people that actually experience this problem
track this down?
kronolith/lib/Kronolith.php and nag/lib/Nag.php explicitely mention a
memory leak that could have the same root. Start looking there.
Jan.
--
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/
More information about the horde
mailing list