'memcache.local' => '\\OC\\Memcache\\Redis' resets to APCu

Hi

I set up Redis and added to my config, but after every major upgrade the config is reset from Redis to APCu. I dont get why that is the case. Redis is also recommended and used in the documentation for memcache.local

I am not sure what I am doing this wrong, the fact that it is reset automatically makes me frustrated as I can’t figure this out.

I am using the Apache Docker compose setup. I created an additional Redis container in the compose like

....
    links:
      - db
      - redis
    depends_on:
      - db
      - redis
....

redis:
    image: redis:latest
    restart: unless-stopped
    command: redis-server

 'memcache.local' => '\\OC\\Memcache\\Redis',                                                                                                                                                                         
  'memcache.distributed' => '\\OC\\Memcache\\Redis',                                                                                                                                                                  
  'memcache.locking' => '\\OC\\Memcache\\Redis',                                                                                                                                                                      
  'redis' =>                                                                                                                                                                                                          
  array (                                                                                                                                                                                                             
    'host' => 'redis',                                                                                                                                                                                                
    'password' => '',                                                                                                                                                                                                 
    'port' => 6379,                                                                                                                                                                                                   
  ),                          

this one

 'memcache.local' => '\\OC\\Memcache\\APCu',                                                                                                                                                                         
  'memcache.distributed' => '\\OC\\Memcache\\Redis',                                                                                                                                                                  
  'memcache.locking' => '\\OC\\Memcache\\Redis',                                                                                                                                                                      
  'redis' =>                                                                                                                                                                                                          
  array (                                                                                                                                                                                                             
    'host' => 'redis',                                                                                                                                                                                                
    'password' => '',                                                                                                                                                                                                 
    'port' => 6379,                                                                                                                                                                                                   
  ),                          

It’s likely always APCu, but you’re only checking your config.php so you’re not seeing your real configuration. Many of the Docker images use multiple config files which are merged. See Viewing your config

Redis is also recommended and used in the documentation for memcache.local

It is not. The opposite is recommended for memcache.local.

1 Like

Thanks for clarification, seeing it in the doc made me think it was ok to use it given I have only couple users.

1 Like

It is also interesting that this one resets as well

I have it set to since my serve runs under DOMAIN/nextcloud

'htaccess.RewriteBase' => '/nextcloud'

resets to

'htaccess.RewriteBase' => '/'

Also I am not sure if APCu is enabled in the Nextcloud’s Apache Docker Compose. How do I check or make sure these are enabled also in the container as well?

It’s not resetting. It’s literally embedded in the image config. Your real merged config always contains this if you’re running the image.

All of those values have been in your real active configuration. As I said, you cannot assume config/config.php is your full config. The entire contents of config/* is merged to generate your real config. Use the occ config:list system command to see the real config. The image brings along many config elements which it requires to operate.

I have it set to since my serve runs under DOMAIN/nextcloud

This should not be necessary. This value is also hardcoded so you’ve been running with it set to / the entire time (well, unless you are getting warnings about out-of-date config files when the container starts). This is true even if you had it set to /nextcloud in your config/config.php because the additional files in config/ take priority.

1 Like

occ config:list system as noted at the docs I linked to previously.

Thanks for the explanation, it all makes sense now.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.