Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unncessary session locking in styles.php #176

Closed
marxjohnson opened this issue Apr 19, 2024 · 1 comment
Closed

Unncessary session locking in styles.php #176

marxjohnson opened this issue Apr 19, 2024 · 1 comment

Comments

@marxjohnson
Copy link
Contributor

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
Copy link
Owner

Hi @marxjohnson ...

That was considered in the last release.

Gracias

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants