-
Bug
-
Resolution: Fixed
-
Minor
-
3.7.4, 3.8.1, 3.9
-
MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
-
MOODLE_37_STABLE, MOODLE_38_STABLE
-
master_
MDL-67746 -
If there are many records to delete '\core\task\task_log_cleanup_task' task can fail due to database limitation and throw an error (this one is for postgresql):
Scheduled task failed: Cleanup of task logs (core\task\task_log_cleanup_task),Error writing to database
|
Debug info:
|
number of parameters must be between 0 and 65535 |
Steps to replicate:
1. Insert 100 000 records into `mdl_task_log` table:
insert into mdl_task_log (type, component, classname, userid, timestart, timeend, dbreads, dbwrites, result, output) select 0, 'moodle', 'core\task\task_log_cleanup_task', 0, 1529580061+i, 1529580062+i, 5, 0,0, 'output' from generate_series(1,100000) i; |
2. Run scheduled task:
php admin/tool/task/cli/schedule_task.php --showdebugging --execute='\core\task\task_log_cleanup_task' |
3. Confirm, that the error occurs.
- will be (partly) resolved by
-
MDL-53735 Split very large SQL-IN parameters to chunks
-
- Closed
-