Hello,
I am using :
moodle 3.8.1
Apache 2.4.41
PHP 7.3.13
HW spec : VPS CPU 4 core. 4GB Ram. 100GB Space
SSL : Let's Encrypt installed with certbot
My moodle keeps filling up the server's disk space regardless of if I delete backups or purge cache/logs. I checked my CRON tasks to see if they are running and I found a couple of errors one which indicates a cleanup task failure and is expected to run normally.
Log file path /opt/bitnami/apps/moodle/moodledata/moodle-cron.log
Default exception handler: خطا در نوشتن بر روی پایگاه داده Debug: Lock wait timeout exceeded; try restarting transaction
UPDATE mdl_config_plugins SET value = ? WHERE id = ?
[array (
0 => 1599034381,
1 => '1934',
)]
Error code: dmlwritDefault exception handler: خطا در خواندن از پایگاه داده Debug: MySQL server has gone away
SELECT * FROM mdl_task_scheduled WHERE classname = ?
[array (
0 => '\\core\\task\\session_cleanup_task',
Here is a wider part of the log file showing more errors :
sh: 1: /usr/bin/gs: not found
Potential coding error - existing temptables found when disposing database. Must be dropped!
Potential coding error - existing temptables found when disposing database. Must be dropped!
Default exception handler: خطا در نوشتن بر روی پایگاه داده Debug: Lock wait timeout exceeded; try restarting transaction
UPDATE mdl_config_plugins SET value = ? WHERE id = ?
[array (
0 => 1599034142,
1 => '1934',
)]
Error code: dmlwriteexception
* line 489 of /lib/dml/moodle_database.php: dml_write_exception thrown
* line 1634 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
* line 1809 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->set_field_select()
* line 1427 of /lib/moodlelib.php: call to moodle_database->set_field()
* line 66 of /lib/cronlib.php: call to set_config()
* line 61 of /admin/cli/cron.php: call to cron_run()Default exception handler: خطا در نوشتن بر روی پایگاه داده Debug: Lock wait timeout exceeded; try restarting transaction
UPDATE mdl_config_plugins SET value = ? WHERE id = ?
[array (
0 => 1599034201,
1 => '1934',
)]
Error code: dmlwriteexception
* line 489 of /lib/dml/moodle_database.php: dml_write_exception thrown
* line 1634 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
* line 1809 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->set_field_select()
* line 1427 of /lib/moodlelib.php: call to moodle_database->set_field()
* line 66 of /lib/cronlib.php: call to set_config()
* line 61 of /admin/cli/cron.php: call to cron_run()Default exception handler: خطا در نوشتن بر روی پایگاه داده Debug: Lock wait timeout exceeded; try restarting transaction
UPDATE mdl_config_plugins SET value = ? WHERE id = ?
[array (
0 => 1599034261,
1 => '1934',
)]
Error code: dmlwriteexception
* line 489 of /lib/dml/moodle_database.php: dml_write_exception thrown
* line 1634 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
* line 1809 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->set_field_select()
* line 1427 of /lib/moodlelib.php: call to moodle_database->set_field()
* line 66 of /lib/cronlib.php: call to set_config()
* line 61 of /admin/cli/cron.php: call to cron_run()Default exception handler: خطا در نوشتن بر روی پایگاه داده Debug: Lock wait timeout exceeded; try restarting transaction
UPDATE mdl_config_plugins SET value = ? WHERE id = ?
[array (
0 => 1599034321,
1 => '1934',
)]
Error code: dmlwriteexception
* line 489 of /lib/dml/moodle_database.php: dml_write_exception thrown
* line 1634 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
* line 1809 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->set_field_select()
* line 1427 of /lib/moodlelib.php: call to moodle_database->set_field()
* line 66 of /lib/cronlib.php: call to set_config()
* line 61 of /admin/cli/cron.php: call to cron_run()Default exception handler: خطا در نوشتن بر روی پایگاه داده Debug: Lock wait timeout exceeded; try restarting transaction
UPDATE mdl_config_plugins SET value = ? WHERE id = ?
[array (
0 => 1599034381,
1 => '1934',
)]
Error code: dmlwritDefault exception handler: خطا در خواندن از پایگاه داده Debug: MySQL server has gone away
SELECT * FROM mdl_task_scheduled WHERE classname = ?
[array (
0 => '\\core\\task\\session_cleanup_task',
)]
Error code: dmlreadexception
* line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
* line 1247 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
* line 1587 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
* line 1559 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
* line 1538 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
* line 680 of /lib/classes/task/manager.php: call to moodle_database->get_record()
* line 229 of /lib/cronlib.php: call to core\task\manager::scheduled_task_failed()
* line 119 of /lib/cronlib.php: call to cron_run_inner_scheduled_task()
* line 73 of /lib/cronlib.php: call to cron_run_scheduled_tasks()
* line 61 of /admin/cli/cron.php: call to cron_run()Exception ignored in shutdown function Closure::__invoke: جدول «task_log» وجود ندارد
PHP Fatal error: Uncaught coding_exception: یک خطای برنامهنویسی شناسایی شد. این خطا باید توسط یک برنامهنویس برطرف شود: A lock was created but not released at:
/opt/bitnami/apps/moodle/htdocs/lib/classes/task/manager.php on line 557Code should look like:
$factory = \core\lock\lock_config::get_lock_factory('type');
$lock = $factory->get_lock(Resource id #742);
$lock->release(); // Locks must ALWAYS be released like this.in /opt/bitnami/apps/moodle/htdocs/lib/classes/lock/lock.php:117
Stack trace:
#0 [internal function]: core\lock\lock->__destruct()
#1 {main}
thrown in /opt/bitnami/apps/moodle/htdocs/lib/classes/lock/lock.php on line 117
Default exception handler: یک خطای برنامهنویسی شناسایی شد. این خطا باید توسط یک برنامهنویس برطرف شود: moodle_database::update_record_raw() id field must be specified. Debug:
Error code: codingerror
* line 1536 of /lib/dml/mysqli_native_moodle_database.php: coding_exception thrown
* line 1593 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->update_record_raw()
* line 624 of /lib/classes/task/manager.php: call to mysqli_native_moodle_database->update_record()
* line 312 of /lib/cronlib.php: call to core\task\manager::adhoc_task_failed()
* line 166 of /lib/cronlib.php: call to cron_run_inner_adhoc_task()
* line 76 of /lib/cronlib.php: call to cron_run_adhoc_tasks()
* line 61 of /admin/cli/cron.php: call to cron_run()Exception ignored in shutdown function Closure::__invoke: جدول «task_log» وجود ندارد
Exception ignored in shutdown function tool_log\log\manager::dispose: خطا در خواندن از پایگاه داده
Potential coding error - existing temptables found when disposing database. Must be dropped!
PHP Fatal error: Uncaught ddl_change_structure_exception: خطا در اجرای DDL sql in /opt/bitnami/apps/moodle/htdocs/lib/dml/moodle_database.php:492
Stack trace:
#0 /opt/bitnami/apps/moodle/htdocs/lib/dml/mysqli_native_moodle_database.php(1072): moodle_database->query_end(false)
#1 /opt/bitnami/apps/moodle/htdocs/lib/ddl/database_manager.php(77): mysqli_native_moodle_database->change_database_structure('DROP TEMPORARY ...', Array)
#2 /opt/bitnami/apps/moodle/htdocs/lib/ddl/database_manager.php(332): database_manager->execute_sql_arr(Array, Array)
#3 /opt/bitnami/apps/moodle/htdocs/lib/dml/moodle_temptables.php(140): database_manager->drop_table(Object(xmldb_table))
#4 /opt/bitnami/apps/moodle/htdocs/lib/dml/moodle_database.php(405): moodle_temptables->dispose()
#5 /opt/bitnami/apps/moodle/htdocs/lib/dml/mysqli_native_moodle_database.php(610): moodle_database->dispose()
#6 /opt/bitnami/apps/moodle/htdocs/lib/dml/moodle_database.php(160): mysqli_native_moodle_database->dispose()
#7 [internal function]: moodle_database->_ in /opt/bitnami/apps/moodle/htdocs/lib/dml/moodle_database.php on line 492
sh: 1: /usr/bin/sendmail: not found