I just started tweaking PHP and MySQL until the archive script stopped giving those errors. So for anyone else with similar issues, here are my tweaks. We have 700+ sites, 300,000 hits/day, log table: 25 million, report tables: 7 million.
php.ini:
max_execution_time = 600
max_input_time = 120
memory_limit = 512M
my.cnf:
max_connections = 400
php.ini:
max_execution_time = 600
max_input_time = 120
memory_limit = 512M
my.cnf:
max_connections = 400