Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 2.6
-
Fix Version/s: 2.6
-
Component/s: Libraries
-
Labels:
-
Testing Instructions:
-
Affected Branches:MOODLE_26_STABLE
-
Fixed Branches:MOODLE_26_STABLE
-
Pull from Repository:
-
Pull Master Branch:w44_
MDL-42485_m26_memcachedlocktimeout -
Pull Master Diff URL:
-
Documentation link:
Description
Memcached sessions will loose their lock after max_execution_time seconds, regardless of if Moodle later extends the time using set_time_limit(). This is because the memcached session handler uses max_execution_time to set the max lock duration at session_start().
This means that long running scripts (like backups and restores) won't hold their session lock for long (only 30 seconds in a default php install).
Now, because of this, there is a potential solution, you could do something like:
public static function start() {
|
$default = ini_get('max_execution_time');
|
set_time_limit($CFG->session_memcached_lock_expire);
|
parent::start();
|
set_time_limit($default);
|
}
|
I fully acknowledge that this is probably horrible in many ways.
You can see the memcached session locking logic at:
https://github.com/php-memcached-dev/php-memcached/blob/master/php_memcached_session.c
Attachments
Issue Links
- is a regression caused by
-
MDL-31501 New session infrastructure - file, database and memcached storage
-
- Closed
-