mdl_logstore_standard_log size problem 2

Re: mdl_logstore_standard_log size problem 2

by Leon Stringer -
Number of replies: 0
Picture of Core developers Picture of Particularly helpful Moodlers

I've never seen The table 'mdl_logstore_standard_log' is full before. But it looks like the most likely cause is that the database server is out of disk space. On Linux servers MySQL and MariaDB store files in /var/lib/mysql so check that, for example with df -h /var/lib/mysql. Presumably there would need to be at least 10 GB free for OPTIMIZE TABLE to complete, i.e. enough working space to temporarily copy the file.

To explain innodb_file_per_table: if this is OFF then all data for all tables for all databases is stored in a single file, normally /var/lib/mysql/ibdata1. If it's ON then data for each table is stored in a separate file, for example for mdl_logstore_standard_log in database bitnami_moodle this might be /var/lib/mysql/bitnami_moodle/mdl_logstore_standard_log.ibd. As the database tables contain more data over time these files grow, but if you delete data (DELETE FROM) these files do not shrink, the space becomes available in the file for new data. So to shrink the files you must run OPTIMIZE TABLE but this only reclaims space if innodb_file_per_table is ON. To check the setting for your database run:

SHOW GLOBAL VARIABLES LIKE 'innodb_file_per_table';
+-----------------------+-------+
| Variable_name         | Value |
+-----------------------+-------+
| innodb_file_per_table | ON    |
+-----------------------+-------+ 

The default is ON.

If you still need help, please share the Moodle version and the database type (MySQL or MariaDB), and version.