-
Improvement
-
Resolution: Fixed
-
Minor
-
4.2.2
-
MOODLE_402_STABLE
-
MOODLE_404_STABLE
-
MDL-79618_master -
During performance analysis on a large site, I found that web service calls to core_course_get_enrolled_courses_with_action_events_by_timeline_classification and core_calendar_get_action_events_by_timesort were sometimes holding long session locks. These are used by the timeline block and may take a couple of seconds on a big site.
They do not appear to mutate the session. I tested adding 'readonlysession' => true to the service definitions and setting $CFG->enable_read_only_sessions_debug = true, and I was able to use the timeline block without generating any errors.
I propose setting 'readonlysession' => true for both of these web services in lib/db/services.php