Cacti Running Out Of Memory In adodb.inc.php
September 27, 2013
Posted by on
I upgraded Debian to Wheezy testing and suddenly Cacti stopped working.
In my Apache logs I found the following error:
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 65484 bytes) in /var/www/html/cacti/cacti-0.8.7g/lib/adodb/adodb.inc.php on line 833
I patched adodb.inc.php to dump the SQL it was trying to run, and I cut and paste one of the statements into a mysql session:
MariaDB [cacti]> select value from `cacti`.`settings` where name='log_verbosity';
ERROR 126 (HY000): Incorrect key file for table './cacti/settings.MYI'; try to repair it
MariaDB [cacti]> quit
So – it looked liked the tables needed repairing (maybe the upgrade from MySQL to MariaDB broke the tables). From the command line I ran the following command to repair all my tables in all my databases:
mysqlcheck -u root -p --auto-repair --all-databases
This solved the problem. Cacti works again for me.