You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While doing some log analysis for a large Moodle site with session lock debugging enabled, I noticed a large proportion of the messages about long session locks came from mod/turnitintooltwo/ajax.php. For locks lasting more than 1 second, this script accounted for about 75%. For those lasting more than 3 seconds, 33%, and those lasting more than 5 seconds, 15%.
I took a loot at this script, and while some of the actions is provides do alter the session, most do not, so do not need to hold a session lock for the whole request.
This can be improved by releasing the session lock if it will not be needed, by adding the following after $action = optional_param():
if (!in_array($action, ['sync_all_submissions', 'get_submissions'])) {
// No changes will be made to the session.
\core\session\manager::write_close();
}
The text was updated successfully, but these errors were encountered:
While doing some log analysis for a large Moodle site with session lock debugging enabled, I noticed a large proportion of the messages about long session locks came from mod/turnitintooltwo/ajax.php. For locks lasting more than 1 second, this script accounted for about 75%. For those lasting more than 3 seconds, 33%, and those lasting more than 5 seconds, 15%.
I took a loot at this script, and while some of the actions is provides do alter the session, most do not, so do not need to hold a session lock for the whole request.
This can be improved by releasing the session lock if it will not be needed, by adding the following after
$action = optional_param()
:The text was updated successfully, but these errors were encountered: