When rebuilding the search index on a forum with 13000ish messages, I run out of memory in the database.
I suggest replacing the commit frenquency to a fixed number of messages rather than total/10 (assuming that's what the original code does).
Note: the "+1" is only so the progress doesn't get a divide by zero.
--- www-old/adm/indexdb.php 2010-12-13 10:59:22.000000000 +0100
+++ www/adm/indexdb.php 2010-12-13 10:59:32.000000000 +0100
@@ -68,7 +68,7 @@
while ($r = db_rowarr($c)) {
index_text($r[1], read_msg_body($r[2], $r[3], $r[4]), $r[0]);
- if ($i && !($i % ceil($i_count/10))) {
+ if ((($i+1) % 100) == 0) {
/* Commit and re-acquire locks. */
db_unlock();
eta_calc($start_time, $i, $i_count);