No disk space due to 10GB mdl_logstore_standard_log.ibd file

Keywords: Moodle - Virtual Machines - Technical issue - Other
Description:
Hi,

I have Bitnami Moodle VM (3.9.2) instance, however, all the disk space has been used (15GB vHDD). The mdl_logstore_standard_log.ibd file is around 10GB!

Reviewing some of the Moodle community posts, it appears as if the table could be optimised by running OPTIMIZE TABLE mdl_logstore_standard_log, however simply running mysql results in an “Access denied” error.

I also not a bunch of __MACOSX folders on the drive, so am wondering if something fishy has gone on. For the time being, I have disabled the vNIC and powered down the machine, but would like to be able to recover if possible, or move the config to a new instance.

Cheers

I haven’t created a support log bundle just as:

  1. There is no HDD space.
  2. I have disabled the vNIC on the VM.

Hi @swin,

You need to run the MySQL’s binary with the required parameters. In order to login to the database, you need to use the following command

mysql -u root -p bitnami_moodle

That command will ask for the root’s password that is the same one we preconfigured when you deployed the machine.

Do you have a Mac computer? Are you mounting the folder in your computer?

https://superuser.com/questions/104500/what-is-macosx-folder

Hi @jota,

I do not use a Mac (hence my worry), although I wonder if a colleague has. I will find out Monday.

I couldn’t get into the DB with you username/pass you gave, but managed to login in with the user/pass listed in the config.php file (albeit difficult via a VMware remote console and no cut and paste :frowning:

Unfortunately, after running MySQL and USEing the correct DB, then running OPTIMIZE TABLE, after about 15 mins I received an error saying that the table didn’t support optimise and that another method was being tried, then that operation failed due to disk space issues (which is obviously what I’m trying to resolve).

Any other ideas? I tried to increase the vHDD drive, but would then need to inflate the partition I guess.

FWIW, I was going to extend the partition to make use of the expanded vHDD as I was sure this didn’t happen automatically, however, after I booted the systems this morning, it appeared as if this had happened automatically!

However, re-running the optimise task on the DB table still failed:

As, you can see, mdl_logstore_standard_log.ibd currently sits at 9.6GB

Hi @swin,

You needed to use “root” and the default password of the instance.

That’s fine too!

If you resize the disk of the machine, you need to restart it for the changes to take effect!

Can you take a look at this post? It seems the database is reaching the limits!

https://dba.stackexchange.com/questions/198569/the-table-is-full-mariadb

FWIW, and WRT logging using root, yes, I was using root :wink:

WRT Database table, I looked at the post and added explicit parameter suggest, although things were either competed out or completely missing, to I suspect that default would apply, and accorded to the post, these would be 16M.

bitnami@debian:~$ cat  stack/mariadb/conf/bitnami/memory.conf          
[mysqld]
#wait_timeout = 120
long_query_time = 1
query_cache_limit=2M
query_cache_type=1
query_cache_size=128M
innodb_buffer_pool_size=256M
#innodb_log_file_size=128M
#innodb_flush_method=O_DIRECT
#tmp_table_size=64M
tmp_table_size=16M
max_heap_table_size=16M
#max_connections = 2500
#max_user_connections = 2500
#key_buffer_size=64M

However, the issue persists:

MariaDB [bitnami_moodle]> OPTIMIZE TABLE mdl_logstore_standard_log;
+------------------------------------------+----------+----------+-------------------------------------------------------------------+
| Table                                    | Op       | Msg_type | Msg_text                                                          |
+------------------------------------------+----------+----------+-------------------------------------------------------------------+
| bitnami_moodle.mdl_logstore_standard_log | optimize | note     | Table does not support optimize, doing recreate + analyze instead |
| bitnami_moodle.mdl_logstore_standard_log | optimize | error    | Temporary file write failure                                      |
| bitnami_moodle.mdl_logstore_standard_log | optimize | status   | Operation failed                                                  |
+------------------------------------------+----------+----------+-------------------------------------------------------------------+
3 rows in set, 1 warning (10 min 59.084 sec)

Ok, I think I see the issue. Look like the setting in the Standard Log was set to “never remove log”, thus we have logs in the store dating back to 2018!

Running

SELECT FROM_UNIXTIME(MIN(timecreated)) FROM mdl_logstore_standard_log;

Output the oldest log, and the setting is located in Site administrationPluginsLoggingStandard log, so have changed Keep logs for to 90 days.

Also manually removed entries for the DB by running

DELETE FROM mdl_logstore_standard_log WHERE timecreated < UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 90 DAY));

(backup taken as a precaution :wink: )

Hi @swin,

I’m really glad to see that you managed to solve the issue and thank you for taking the time to write the commands you used to modify the app’s configuration, it’ll be really helpful for other users running into the same problem.

Enjoy :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.