All,

I replaced redis with valkey tonight on a long-running nextcloud install. I followed the wiki pages exactly:

https://wiki.archlinux.org/title/Valkey

  (I set all options as shown to suppress warnings)

and

https://wiki.archlinux.org/title/Nextcloud#Valkey_(Redis)

  (valkey is running on unixsockets per the wiki)

However, upon starting/enabling valkey and restarting apache, attempting to reach nextcloud results in:

<quote>
Internal Server Error

The server encountered an internal error and was unable to complete your request. Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.
</quote>

  git, http and nextcloud were added to the valkey group:

$ grep valkey /etc/group
valkey:x:971:git,http,nextcloud

valkey is up and happily running and the socket has 0770 permissions per the wiki:

$ scs valkey
● valkey.service - Advanced key-value store
Loaded: loaded (/usr/lib/systemd/system/valkey.service; enabled; preset: 5:185mdisabled)
     Active: active (running) since Sat 2025-04-26 21:09:31 CDT; 17min ago
 Invocation: 5dc6c28081374c00837d5f7f94c38a95
   Main PID: 1913 (valkey-server)
     Status: "Ready to accept connections"
      Tasks: 6 (limit: 4575)
     Memory: 3.4M (peak: 3.9M)
        CPU: 1.100s
     CGroup: /system.slice/valkey.service
             └─1913 "/usr/bin/valkey-server 127.0.0.1:6379"

Apr 26 21:09:31 2pi valkey-server[1913]: 1913:M 26 Apr 2025 21:09:31.488 * Running mode=standalone, port=6379. Apr 26 21:09:31 2pi valkey-server[1913]: 1913:M 26 Apr 2025 21:09:31.488 * Server initialized Apr 26 21:09:31 2pi valkey-server[1913]: 1913:M 26 Apr 2025 21:09:31.488 * Loading RDB produced by Valkey version 8.1.1 Apr 26 21:09:31 2pi valkey-server[1913]: 1913:M 26 Apr 2025 21:09:31.488 * RDB age 784 seconds Apr 26 21:09:31 2pi valkey-server[1913]: 1913:M 26 Apr 2025 21:09:31.488 * RDB memory usage when created 0.85 Mb Apr 26 21:09:31 2pi valkey-server[1913]: 1913:M 26 Apr 2025 21:09:31.488 * Done loading RDB, keys loaded: 0, keys expired: 0. Apr 26 21:09:31 2pi valkey-server[1913]: 1913:M 26 Apr 2025 21:09:31.488 * DB loaded from disk: 0.000 seconds Apr 26 21:09:31 2pi valkey-server[1913]: 1913:M 26 Apr 2025 21:09:31.488 * Ready to accept connections tcp Apr 26 21:09:31 2pi valkey-server[1913]: 1913:M 26 Apr 2025 21:09:31.488 * Ready to accept connections unix
Apr 26 21:09:31 2pi systemd[1]: Started Advanced key-value store.

$ l /run/valkey/
total 0
drwxr-xr-x  2 valkey valkey   60 Apr 26 21:09 .
drwxr-xr-x 46 root   root   1100 Apr 26 21:09 ..
srwxrwx---  1 valkey valkey    0 Apr 26 21:09 valkey.sock

  The config.php was updated per the wiki to use valkey:

$ sudo tail /etc/webapps/nextcloud/config/config.php
  'filelocking.enabled' => true,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/run/valkey/valkey.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),
);

Attempting to access the nextcloud instance results in 6 messages in nextcloud.log (they repeat each time nextcloud does its cron update). I've summarized each in pretty-print so they are readable:

1.
{
  "reqId": "Ga2ygrBvnNRsfUk5PSik",
  "level": 4,
  "time": "2025-04-27T01:34:11+00:00",
  "remoteAddr": "192.168.6.196",
  "user": false,
  "app": "app_api",
  "method": "GET",
  "url": "/nextcloud/login",
  "message": "Error during app service registration: Permission denied",
...
    "File": "/usr/share/webapps/nextcloud/lib/private/RedisFactory.php",
    "Line": 104,
    "message": "Error during app service registration: Permission denied",
    "exception": {},
"CustomMessage": "Error during app service registration: Permission denied"
  }
}

2.
{
  "reqId": "Ga2ygrBvnNRsfUk5PSik",
  "level": 4,
  "time": "2025-04-27T01:34:11+00:00",
  "remoteAddr": "192.168.6.196",
  "user": false,
  "app": "no app in context",
  "method": "GET",
  "url": "/nextcloud/login",
  "message": "Could not boot webhook_listeners: Redis server went away",
...
    "File": "/usr/share/webapps/nextcloud/lib/private/Memcache/Redis.php",
    "Line": 59,
    "message": "Could not boot webhook_listeners: Redis server went away",
    "exception": {},
"CustomMessage": "Could not boot webhook_listeners: Redis server went away"
  }
}

3.
{
  "reqId": "Ga2ygrBvnNRsfUk5PSik",
  "level": 4,
  "time": "2025-04-27T01:34:11+00:00",
  "remoteAddr": "192.168.6.196",
  "user": false,
  "app": "no app in context",
  "method": "GET",
  "url": "/nextcloud/login",
  "message": "Could not boot workflowengine: Redis server went away",
...
    "File": "/usr/share/webapps/nextcloud/lib/private/Memcache/Redis.php",
    "Line": 59,
    "message": "Could not boot workflowengine: Redis server went away",
    "exception": {},
"CustomMessage": "Could not boot workflowengine: Redis server went away"
  }
}

4.
{
  "reqId": "Ga2ygrBvnNRsfUk5PSik",
  "level": 3,
  "time": "2025-04-27T01:34:11+00:00",
  "remoteAddr": "192.168.6.196",
  "user": false,
  "app": "index",
  "method": "GET",
  "url": "/nextcloud/login",
  "message": "Redis server went away",
...
    "File": "/usr/share/webapps/nextcloud/lib/private/Memcache/Redis.php",
    "Line": 59,
    "message": "Redis server went away",
    "exception": {},
    "CustomMessage": "Redis server went away"
  }
}

5.
{
  "reqId": "Ga2ygrBvnNRsfUk5PSik",
  "level": 3,
  "time": "2025-04-27T01:34:11+00:00",
  "remoteAddr": "192.168.6.196",
  "user": false,
  "app": "core",
  "method": "GET",
  "url": "/nextcloud/login",
  "message": "Redis server went away",
...
    "File": "/usr/share/webapps/nextcloud/lib/private/Memcache/Redis.php",
    "Line": 59,
    "message": "Redis server went away",
    "exception": {},
    "CustomMessage": "Redis server went away"
  }
}

6.
{
  "reqId": "Ga2ygrBvnNRsfUk5PSik",
  "level": 3,
  "time": "2025-04-27T01:34:11+00:00",
  "remoteAddr": "192.168.6.196",
  "user": false,
  "app": "core",
  "method": "GET",
  "url": "/nextcloud/login",
  "message": "Redis server went away",
...
    "File": "/usr/share/webapps/nextcloud/lib/private/Memcache/Redis.php",
    "Line": 59,
    "message": "Redis server went away",
    "exception": {},
    "CustomMessage": "Redis server went away"
  }
}

This has me baffled. Both the valkey(redis) and nextcloud wiki changes make logical sense and seem like that should result in a painless upgrade. I was not so lucky.

  Is there something else needed to switch nextcloud from redis to valkey?

 1. I stopped/disabled redis.
 2. Installed valkey removing redis
 3. Updated all configs per both wikis
 4. started/enabled valkey (all good)
 5. restarted httpd (all good)
 6. attempted to access nextcloud (failed with the error above)

Anybody have any ideas how I can get nextcloud back up and running with valkey? Worst case I'll try disableing redis/valkey altogether in the nextcloud config and run without caching -- not optimal. It was running perfectly with redis before the upgrade, so I'm stuck.



--
David C. Rankin, J.D.,P.E.

Reply via email to