Memcaching crashes NC17

Hi All,

This is for a brand new fresh install of NC17.0.1 on a Ubuntu18.04 LNMP server

I have installed acpu, memcached and redis. I have edited my php.ini file

Everytime I try to enable memcached or redis on my config.php, and restart nginx, NC crashes

Here is my config file:

  'memcache.local' => '\OC\Memcache\APCu',
#  'memcache.distributed' => '\OC\Memcache\Memcached',
#  'memcache.local' => '\\OC\\Memcache\\Redis',
#    'memcache.locking' => '\\OC\\Memcache\\Redis',
#    'redis' =>
#     array (
#      'host' => '/var/run/redis/redis.sock',
#      'port' => 6379,
#      'timeout' => 0,
#      'password' => '',
#      'dbindex' => 0,
#  ),

Here is the server status on each one:

root@file:/etc/php/7.3/mods-available# ps ax | grep redis
25747 ?        Ssl    0:01 /usr/bin/redis-server 127.0.0.1:6379
28173 pts/0    S+     0:00 grep --color=auto redis
root@file:/etc/php/7.3/mods-available# ps ax | grep memcache
23818 ?        Ssl    0:00 /usr/bin/memcached -m 64 -p 11211 -u memcache -l 127.0.0.1 -P /var/run/memcached/memcached.pid
28175 pts/0    S+     0:00 grep --color=auto memcache
root@file:/etc/php/7.3/mods-available# ps ax | grep acpu
28177 pts/0    S+     0:00 grep --color=auto acpu
root@file:/etc/php/7.3/mods-available# 

Can someone guide me on getting Redis working with NC

IMHO avoid memcached if the other two are around (which is the preferred solution).

Have a look at:


Hope this helps.
:smile:

Please make sure that the redis.conf file contains at least the following line:

unixsocket /var/run/redis/redis.sock

Check the ownership and file access rights of the Redis socket:

ls -al /var/run/redis/redis.sock

Change the Redis configuration as follows:

'memcache.locking' => 'OC\\Memcache\\Redis',

'redis' => array (
   'host' => '/var/run/redis/redis.sock',
   'port' => 0,                                # <<< !!!
   'timeout' => 0.0
),

“Memcached” (distributed) is normally not required for a local installation.

3 Likes

Thank you sooooooo much for your help

I don’t have a /var/run/redis/redis.sock file, the only file in that folder is redis-server.pid

I forgot to give ownership to the redis folder.

It is up and running now,

Thank you again, j-ed

1 Like