-
Bug
-
Resolution: Fixed
-
Minor
-
3.9.10, 3.10.7, 3.11.3
-
MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE
-
MOODLE_311_STABLE
-
MDL-72796_fix-retry-delay-for-redis-session-cache -
In lib/classes/session/redis.php on Line 196, a random delay between 100000 and 500000 is selected. It is further used as the 5th parameter for the Redis->connect() call. That's the $retryInterval, a retry interval in milliseconds.
This means we are effectively waiting with a retry delay of 100 seconds to 500 seconds. The indented wait should be 100 ms to 500 ms, see here for reference.
That's off by a factor of a thousand! Using Redis as a session cache and when the connection hangs, you can get random cannot obtain session lock errors because it's waiting up to 500 seconds (or about 8.33 minutes) for a Redis connection.
- is a regression caused by
-
MDL-59866 Edge case affecting redis sessions
- Closed