APCu cache issues with PHP [SOLVED]

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

APCu cache issues with PHP [SOLVED]

Postby xboxboy » Feb 2nd, '24, 15:51

Having issues updating my Nextcloud server web app which I installed manually on Mga8, which has since been upgraded to Mga9. Php itself was also upgraded to V.8, which was good, as support for 7 via Nextcloud has stopped.

So to update nextcloud server I have to run a php updater script. I'm coming across two issues, both I can work around but I'd like to sort it out.
First issue, I start the updater script (all as the "apache" user)
Code: Select all
php updater.phar

Which fails due to a memory issue, so to get around that I found this line, and it works
Code: Select all
php -d memory_limit=512M updater.phar

I think this may be a hang over from when I ran this install a decade ago on my Raspberry PI, so there's probably just a php config I need to update for more memory now I'm on a x86 server.

So running that line, the updater gets almost to the end, then fails (second issue):

Code: Select all
An unhandled exception has been thrown:
OCP\HintException: [0]: Memcache OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)


Now "php -m" shows that APCu is installed.

I have been able to complete the update with the following line:
Code: Select all
php --define apc.enable_cli=1 occ upgrade


Which picks up where the updater.phar script ended, and is able to complete the update.

The APCu fault is the main issue, but if I could get some pointers how to fix both, that would be great.
TIA
Last edited by xboxboy on Mar 8th, '24, 14:02, edited 1 time in total.
xboxboy
 
Posts: 400
Joined: Jun 2nd, '13, 06:41

Re: APCu cache issues with PHP

Postby morgano » Feb 2nd, '24, 17:14

Feel free to add your wisdom to https://wiki.mageia.org/en/Nextcloud :)

I guess the author of https://wiki.mageia.org/en/Nextcloud_se ... with_NGINX may be able to help.
At home & work Mandriva since 2006, Mageia 2011. Thinkpad T40, T43, T60, T400, T510, Dell M4400, M6300, Acer Aspire 7. Workstation using LVM, LUKS, VirtualBox, BOINC
morgano
 
Posts: 1475
Joined: Jun 15th, '11, 17:51
Location: Kivik, Sweden

Re: APCu cache issues with PHP

Postby doktor5000 » Feb 2nd, '24, 17:32

You could also just search for the error, see e.g. the first two hits:
https://help.nextcloud.com/t/occ-wont-r ... pcu/119724
https://github.com/nextcloud/server/issues/27781
which leads to the official documentation:
https://docs.nextcloud.com/server/21/ad ... n.html#id1
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18013
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: APCu cache issues with PHP

Postby xboxboy » Feb 23rd, '24, 16:35

Thanks doktor, I used some googlefu and got there in the end.
My only warning on the admin page is to do with maintenance/cron jobs: I have attempted that, but I'll let it run for a day or two and recheck.
xboxboy
 
Posts: 400
Joined: Jun 2nd, '13, 06:41

Re: APCu cache issues with PHP

Postby xboxboy » Feb 23rd, '24, 16:48

Turns out my cron entry was correct: I just hadn't enabled it in the nextcloud config.php

If it keeps working fine for the next short while, I'll mark as solved.
xboxboy
 
Posts: 400
Joined: Jun 2nd, '13, 06:41


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest