-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.4, 5.0
I'm running a 3 nodes redis + sentinel HA setup, which is used as a cachestore for a quite large Moodle installation (~30k users). The redis master node is reached by each webserver through a local HA Proxy instance, which probe for the master node every seconds.
When the task cache_cron_task runs, the way the redis cache store is implemented makes the master redis server failover, because the sub-optimal implementation takes a very long time to run.
The issue has been first reported to Redis and can be seen here : https://github.com/redis/redis/issues/12968
They pin pointed the issue in the find_by_prefix implementation (https://github.com/moodle/moodle/blob/main/cache/stores/redis/lib.php#L675 ) and recommend using HSCAN in place of HKEYS.