Cacti How to Solve PHP Fatal Error: Allowed memory size of {x} bytes exhausted (tried to allocate {y} bytes) in {$cacti_dir}/lib/adodb/adodb.inc.php on line {z}

If this error happened unexpectedly, it could be because of corrupted database tables.

We can fix it with this command from commandline:

[pastacode lang=”bash” manual=”mysqlcheck%20-u%20root%20-p%20–auto-repair%20–all-databases” message=”” highlight=”1″ provider=”manual”/]

And then when the command executed successfully you may run the database repair tool from cacti directory like that:

[pastacode lang=”bash” manual=”%2Fusr%2Fbin%2Fphp%20%7B%24cacti_dir%7D%2Fcli%2Frepair_database.php” message=”” highlight=”1″ provider=”manual”/]