So apologies if it is the wrong place.
We have a Scheduled tasks that was running up to about this time last week. We have been able to run it successfully from the command line and it completes but we are seeing errors related to not being to unlock the task. Any thoughts on where to start diagnosing the exact problem and resolving it.
We are on Moodle 3.7.1+ (Build: 20190725)
error output from task
used 1399254 dbqueries
... used 3693.0848801136 seconds
Scheduled task complete: assessmentgrades (local_assessmentgrades\\task\\assessmentgrades)
* line 1329 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
* line 1375 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
* line 84 of /lib/classes/task/database_logger.php: call to mysqli_native_moodle_database->insert_record()
* line 299 of /lib/classes/task/logmanager.php: call to core\task\database_logger::store_log_for_task()
* line 718 of /lib/classes/task/manager.php: call to core\task\logmanager::finalise_log()
* line 163 of /admin/tool/task/cli/schedule_task.php: call to core\task\manager::scheduled_task_complete()
Default exception handler: Error reading from database Debug: MySQL server has gone away
SELECT * FROM mdl_task_scheduled WHERE classname = ?
0 => '\\local_assessmentgrades\\task\\assessmentgrades',