Hi All, Recently I found the following behaviour in my cron logs,
Repairing DBMAIL physmessage integrity... Ok. Found [156629] unconnected physmessages Sep 26 18:40:51 mail01 dbmail-util[13321]: Error:[sql] dbmysql.c,db_query(+290): [The total number of locks exceeds the lock table size] [DELETE FROM dbmail_physmessage WHERE id NOT IN (SELECT physmessage_id FROM dbmail_messages)] Warning: could not delete orphaned physmessages. Check log. I'm using dbmail 2.2.10 I think this happens because dbmail-util tries to remove all 156629 physmessages in a single statement, therefore all other threads have to wait until this query is finished. Also I'm guessing that this http://www.mail-archive.com/[email protected]/msg15575.html bug report by Michael Monnerie led to the current situation. Because I needed to fix this I built my own php script. It basically works like this: SELECT id FROM dbmail_physmessage WHERE id NOT IN (SELECT physmessage_id FROM dbmail_messages) per 100 id's (per id would be way too slow. I found 100 to be a good number of records): DELETE FROM dbmail_physmessage WHERE id IN ( __100idshere__ ) Greetings, Casper
_______________________________________________ DBmail mailing list [email protected] http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
