I'm getting a database error saving the backup controller to the database when trying to start a course backup. It's a database error triggered here:
https://github.com/moodle/moodle/blob/v3.5.12/backup/util/dbops/backup_controller_dbops.class.php#L85
The issue is that the controller field in the backup_controllers table is a text field (so max size is ~64kb) but the serialized controller object is ~154kb. I'm assuming that there is some weird recursive shenanigans going on given that when I try to print_r that object, I run out of memory -- and that was after allowing for a ludicrous amount of memory: Fatal error: Out of memory (allocated 824180736) (tried to allocate 803213312 bytes).
This only happens with a specific course, other courses in the site are fine.
by Peter Miller.