[ingo] convert_imp_filters.php exhausting memory, other fixes/kludges.

brian@highstream.kicks-ass.org brian at highstream.kicks-ass.org
Wed Aug 31 06:58:52 PDT 2005


I didn't find anything in the archives about this so I figured I'd post
this for posterity.

convert_imp_filters.php can quickly exhaust all available RAM on a decent
sized userbase using the default instructions. I chewed up 3Gs before the
process died on my machine.

instead of

php convert_imp_filters.php < filterusers

as suggested in ingo/scripts/convert_imp_filters.php comments

try using:

for i in `< filterusers `; do echo $i | php convert_imp_filters.php ; done

a quick way to generate the "filterusers" file is:

mysql -B --user=root --password=**** horde -e"select pref_uid FROM horde_prefs where pref_scope=\"imp\" and pref_name=\"filters\"; " | sort|uniq > filterusers

also if you have some users with huge IMP filter rulesets you might have
to increase the value of "max_allowed_packet" in mysql

set max_allowed_packet=value_in_bytes;

from mysql shell. I had problems with this set to 1M raise to 16M fixed
it.

hope this saves someone some headaches.

thanks,
brian
--
Never be afraid to tell the world who you are.
              -- Anonymous
  09:45:01 up 10 days,  2:24,  3 users,  load average: 1.25, 1.06, 1.02


More information about the ingo mailing list