Auto file is generated inside tmp in the root directory

Auto file is generated inside tmp in the root directory

by Md Milton -
Number of replies: 1

After updating moodle v 3.9.1 to v 3.11.2  then auto file is generated inside tmp in the root directory of the server and the storage becomes full, also three CRON job is being failed others is working fine, after running one cron job manually then error is coming,

Current Server Information:
Ubuntu 16.04, ec2-AWS
RDS for database, AWS
PHP - 7.3.30
MySQL - 5.7.33

Background processing for assignment module

Execute scheduled task: Background processing for assignment module (mod_assign\task\cron_task)
... started 12:48:00. Current memory use 14.2MB.
... used 10751 dbqueries
... used 12.831218957901 seconds
Scheduled task failed: Background processing for assignment module (mod_assign\task\cron_task),Invalid course module ID
Backtrace:
* line 1801 of /mod/assign/locallib.php: call to course_modinfo->get_cm()
* line 1693 of /mod/assign/locallib.php: call to assign->get_course_module()
* line 1711 of /mod/assign/locallib.php: call to assign->get_default_instance()
* line 1360 of /mod/assign/locallib.php: call to assign->get_instance()
* line 2754 of /mod/assign/locallib.php: call to assign->update_calendar()
* line 44 of /mod/assign/classes/task/cron_task.php: call to assign::cron()
* line 253 of /lib/cronlib.php: call to mod_assign\task\cron_task->execute()
* line 167 of /admin/cli/scheduled_task.php: call to cron_run_inner_scheduled_task()

===================================

Unused H5P files cleanup

Execute scheduled task: Unused H5P files cleanup (core\task\h5p_clean_orphaned_records_task)
... started 12:46:51. Current memory use 14.4MB.
... used 1 dbqueries
... used 0.0035300254821777 seconds
Scheduled task failed: Unused H5P files cleanup (core\task\h5p_clean_orphaned_records_task),Error reading from database
Debug info:
Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8mb4_unicode_ci,IMPLICIT) for operation '='
SELECT h5p.id
                  FROM df2gx_h5p h5p
             LEFT JOIN df2gx_files f
                    ON f.pathnamehash = h5p.pathnamehash
                 WHERE f.pathnamehash IS NULL
[array (
)]
Backtrace:
* line 1212 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
* line 49 of /lib/classes/task/h5p_clean_orphaned_records_task.php: call to mysqli_native_moodle_database->get_recordset_sql()
* line 253 of /lib/cronlib.php: call to core\task\h5p_clean_orphaned_records_task->execute()
* line 167 of /admin/cli/scheduled_task.php: call to cron_run_inner_scheduled_task()



Average of ratings: -
In reply to Md Milton

Re: Auto file is generated inside tmp in the root directory

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

This scheduled task is failing because of a problem with the database: Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8mb4_unicode_ci,IMPLICIT) for operation '='.

It looks like you have a different collation settings for some (or all) database tables to the dbcollation in config.php. I would suggest performing the migration steps to switch to utf8mb4_unicode_ci which should ensure all database tables and config.php use the same character collation. The steps for this migration are summarised as steps 1 - 4 here, back up your database first.

Average of ratings: Useful (1)