davidherney / moodle-format_onetopic

Course format Onetopic to LMS Moodle
GNU General Public License v3.0
19 stars 45 forks source link

Unncessary session locking in styles.php #176

Closed marxjohnson closed 6 months ago

marxjohnson commented 7 months ago

I have been performing some performance and log analysis on a large Moodle site, and am seeing the following error cropping up a lot:

Cannot obtain session lock for sid: XXX within 120 seconds. It is likely another page ([pid 257125] YYY:/course/format/onetopic/styles.php) has a long session lock, or the session lock was never released

I'm not sure why a request to this script should take so long so it may be an incorrect report, but I took a look at styles.php and it doesn't appear to require the user's session at all. The only Moodle API usage is a single call to get_config(). It should be safe to add define('NO_MOODLE_COOKIES', true); before including config.php and avoid touching the session at all.

davidherney commented 6 months ago

Hi @marxjohnson ...

That was considered in the last release.

Gracias