turnitin / moodle-mod_turnitintooltwo

Turnitin Direct plugin (version 2) for Moodle
http://www.turnitin.com
32 stars 63 forks source link

Files page throws Ajax error on site with many activities #687

Open jhutch1 opened 1 year ago

jhutch1 commented 1 year ago

This is on a site with more than 9000 mod_turnitintooltwo activities, running Moodle 3.9.9

When visiting the "Moodle Direct File Browser" page at /mod/turnitintooltwo/settings_extras.php?cmd=files the page loads for about seven seconds before throwing the following error in a popup box:

DataTables warning: table id=filesTable - Ajax error. For more information about this error, please see http://datatables.net/tn/7

jhutch1 commented 1 year ago

On further investigation it looks like this page was hitting the 1 GB PHP memory limit. I tried raising the limit to 2 GB, but it hit that as well.

It might be that mod_turnitintooltwo is trying to send all the information for all the files on the site at once.

jhutch1 commented 1 year ago

I was able to get the page to eventually load on a larger server with a 4 GB memory limit. The browser window takes about three minutes to load, and uses 5 GB of RAM.

I'd suggest that the plugin should split up the data when there are large numbers of files to display, to avoid these problems.