-
Bug
-
Resolution: Fixed
-
Minor
-
3.0.5, 3.0.6, 3.0.7, 3.0.8, 3.1.1, 3.1.2, 3.1.3, 3.2, 3.2.5, 3.3.2, 3.4
-
PHP 7.0, session handler memcached 3.x
-
MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE
-
MOODLE_32_STABLE, MOODLE_33_STABLE
-
Easy
-
For an installation using PHP 7 and memcached (3.x) for sessions, MDL-53947 mis-configures the the memcached.sess_lock_wait_max value (default 2 sec.) to be acquiretimeout * 1000 (effectively 120 sec.).
Unfortunately, the docs are not .... what they could be, and were misinterpreted.
The names for the memcached configs were not simply altered; the entire scheme of polling for a session lock was changed, and the two _max and _min configs have entirely different uses. There is no longer a config that correlates directly to how long you wait for a session lock before giving up.
Reviewing the code change, the _min and _max values determine the initial (_min) and subsequent (_max) values passed to usleep()--with a twist. Between each attempt, the argument is adjusted to be the minimum of the _max value or 2 X the last used value.
Using the values from config-dist.php in conjunction with the MDL-53947 code modification results in a max lock timeout of 31 seconds (rather than the 120 you expect); this reduced timeout value (not matching the acquiretimeout value) breaks MDL-53713--for PHP7 + memcached sessions.