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.
I have been performing some performance and log analysis on a large Moodle site, and am seeing the following error cropping up a lot:
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 adddefine('NO_MOODLE_COOKIES', true);
before including config.php and avoid touching the session at all.