Alain Raap による投稿

In our Moodle environment we don't have more than one application server. We store the cache, localcache and temp files on the application server and that is much faster, also for the temporary backup files that aren't saved over the network anymore. It works fine for us.
Alistair we've also had issues with NFS4 and performance problems on Redhat 7, feel free to send me a DM to see if I can help you.

Here's a post of our problems with NFS and our solution, also take a look at caching of the temp files and the cache and localcache, don't store it on NFS!!

https://moodle.org/mod/forum/discuss.php?d=362709
Yes, Redis works fine on a unix socket, this is the redis-cli output:

redis-cli -s /var/run/redis/redis.sock
redis /var/run/redis/redis.sock> ping
PONG
redis /var/run/redis/redis.sock>
error MoodleMaybe I say it wrong, with parameters server and socket I can't make a connection with Redis:

These are the messages I see in the Apache error_log:
PHP Warning: Redis::connect(): connect() failed: Connection refused in /var/www/moodle/cache/stores/redis/lib.php on line 159
PHP message: PHP Warning: Redis::connect(): connect() failed: Permission denied in /var/www/moodle/lib/classes/session/redis.php on line 171
PHP message: Failed to connect (try 1 out of 5) to redis at /var/run/redis/redis.sock:0

In config.php I changed this:

$CFG->session_redis_host = '/var/run/redis/redis.sock';
$CFG->session_redis_port = 0;

In redis.conf I changed this:

port 0
unixsocket /var/run/redis/redis.sock
unixsocketperm 660

In redis.log I see:

19666:M 07 Aug 14:22:19.504 * The server is now ready to accept connections at /var/run/redis/redis.sock

When I want to login in Moodle I see the error above.



If I configure the unix socket path (/var/run/redis.sock) in the Redis Caching configuration I get an error "Redis server went away" when I try to login.
When I change this in 127.0.0.1:0 (also in config.php, the session configuration for Redis) I get the same error.

I read this article, and that's easy to change Redis to listen to a unix socket, but Moodle doesn't seem to understand this configuration: https://guides.wp-bullet.com/how-to-configure-redis-to-use-unix-socket-speed-boost/