At first I thought it is a timeout issue but as the UI fails at just over 200 seconds I started to doubt it.
Environment: Windows 2012 R2, IIS 8.5, PHP 7.4.29, Moodle 3.10.8. Restore file size 30Mb. The file has been placed on the Moodle server in a server file repository. No problem picking the file and going thru restore UI pages but after about 3 minutes 20 ~ 30 seconds, restore failed.
PHP error log there are hundreds of repeated lines like these before it throws the error "Default exception handler: Can't find data record in database table course. Debug: SELECT * FROM {course} WHERE id = ?
[array (
0 => 390,
)]
Error code: invalidrecord
The repeating lines are:
C:\inetpub\wwwroot\mymoodle\restore_stepslib.php on line 4926
[08-Jun-2022 14:06:28 America/Los_Angeles] PHP Notice: Trying to get property 'parent' of non-object in C:\inetpub\wwwroot\mymoodle\restore_stepslib.php on line 4916
[08-Jun-2022 14:06:28 America/Los_Angeles] PHP Notice: Trying to get property 'parent' of non-object in
All 3 FastCGI timeout are set to 3600 (1 hour). PHP max_execution_time is set to 600 (10 minutes).
However, the same course in the same location can be restored via the cli tool restore_backup.php.
Other smaller courses (<10Mb) restored without problem. Post_max_size and uplaod_max_filesize are both set to 20MB. But since the file is already on the server, I assume it doesn't matter.
Any suggestion is appreciated.