Score:0

after a reinstall I'm having issues with OPcache Memcache Redis when Nextcloud tries to run cron

in flag

I had issues with mysql not being able to be updated. I ended up having to uninstalling it, which uninstalled a lot of other files and unfortunately I did autoremove. Anyways I did save a copy of what was autoremoved and I made a backup of my databases.

I purged mysql-server, mysql-client and mysql-common. I reinstalled mysql-server and it now was the latest version but what I didn't do is back up the users because nothing mentioned that and it slipped my mind completely .. I was hoping the backup I made kept them but it didn't. So I it took me a while but I found the passwords I was using for most of my databases, reinstalled what was autoremoved and most everything is back to normal but I did run into one problem....

Let me say that I also ran rsync and basically tried to bring my system back to the beginning of this month before attempting to do anything about mysql but I was still having this issues with mysql so it didn't restore to exactly what it was at the beginning of the month (I guess I will have to have someone who has used rsync to tell me how to make it fully back up your system and fully restore your system to exactly the way it was when you ran it).

I'm saying this because I did make some changes to a website (that dealt with mysql), made a python script (which wouldn't have anything to do with this issue) and of course ran system updates (but it shouldn't have effected nextcloud's access to opcache/memcache), since the rsync backup so items may have updated. I believe nextcloud updated in that period because I did had to update NC again to get other parts of nextcloud to fully function. For some reason the file structure wasn't showing on the desktop webpage but it was on my phone but updating it to 25.02 solved that but the update to nextcloud didn't cause this issue because it did work at the start (before rsync) when I updated to 25.02 with the mysql still telling me there was an update but it was held because of conflicts (thus not allowing me to update) by apt.

Nothing has changed in the nextcloud's conf file that has been working forever:

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

I looked at php info everything seems enabled and working...

Zend OPcache
Opcode Caching  Up and Running

redis
Redis Support   enabled
Redis Version   5.3.7

raphf
Resource and persistent handle factory support  enabled
Extension version   2.0.1

memcached
memcached support   enabled
Version 3.2.0

http
HTTP Support    enabled
Extension Version   4.2.3

yet if I try to run sudo -u www-data php -f /web/nextcloud/cron.php I get:

PHP Warning:  Cannot load module "http" because required module "raphf" is not loaded in Unknown on line 0
OCP\HintException: [0]: Memcache \OC\Memcache\Redis not available for local cache 
(Is the matching PHP module installed and enabled?)

and Cron Daemon sends and email message every 5 minutes. Other then the above error no other errors seem to be logged to point me in a direction to solve this issue. The redis-server log looks like everything is functioning properly.

1840:M 25 Dec 2022 06:02:50.051 * 10 changes in 300 seconds. Saving...
1840:M 25 Dec 2022 06:02:50.055 * Background saving started by pid 137575
137575:C 25 Dec 2022 06:02:50.510 * DB saved on disk
137575:C 25 Dec 2022 06:02:50.511 * RDB: 0 MB of memory used by copy-on-write
1840:M 25 Dec 2022 06:02:50.557 * Background saving terminated with success

I'm stumped and don't even know where to start :( I tried to include all relevant information but let me know if I need to include anything else

Score:0
in flag

I have no idea how I fixed it. All I did was run a script I made to change php version back to 7.4. I tried to run sudo -u www-data php -f /web/nextcloud/cron.php and it succeeded Then for the heck of it I ran the script again and changed to 8.1 and then ran the cron command again and it succeeded without the http/raphf memcache errors. Switching to PHP 7.4 and then back to 8.1 somehow resolved the issues.

:( lol I hate when I fix things but don't know what changed because no files where changed, they were already on my system. When the cron command ran in PHP 7.4 it ran for a long time (because of the errors ever since I updated mysql). I saw mysql and php very cpu active.

I'm assuming that maybe something in the mysql db for nextcloud was weird because of having to restore it. For some reason it worked for the cron and maybe that updated the nextcloud db and fixed whatever was set wrong in the nextcloud db .. but that's just a guess .. doesn't explain why it worked in 7.4. When the db was backed up it was on a working db and I was running PHP 8.1

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.