Can't Use Occ To Update Apps

I am running Ubuntu 20.04 LAMP NC 24.0.5
Apache Error Logs are Clean
Still Running php7.4 (will update soon)

For months I have been using this cronjob to automatically update my NC install:
#@daily php /home/username/public_html/occ app:update --all #Updates Nextcloud Nightly

But for reaons unbeknowst to me. Command line updates of NC now failed with the following error:

$ php /home/username/public_html/occ app:update --all
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
uppush new version available: 1.1.1
An unhandled exception has been thrown:
TypeError: count(): Argument #1 ($value) must be of type Countable|array, bool given in /home/username/public_html/lib/private/Memcache/Redis.php:81
Stack trace:
#0 /home/username/public_html/lib/private/Memcache/Redis.php(81): count()
#1 /home/username/public_html/lib/private/App/AppManager.php(451): OC\Memcache\Redis->clear()
#2 /home/username/public_html/lib/private/legacy/OC_App.php(1005): OC\App\AppManager->clearAppsCache()
#3 /home/username/public_html/lib/private/Installer.php(201): OC_App::updateApp()
#4 /home/username/public_html/core/Command/App/Update.php(115): OC\Installer->updateAppstoreApp()
#5 /home/username/public_html/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\App\Update->execute()
#6 /home/username/public_html/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#7 /home/username/public_html/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#8 /home/username/public_html/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#9 /home/username/public_html/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run()
#10 /home/username/public_html/console.php(100): OC\Console\Application->run()
#11 /home/username/public_html/occ(11): require_once('...')

Any tips?

For me it looks like a problem with your Redis server. Make sure that it is correctly configured and running.

There is a sudo -u www-data missing in front of php /home/username/public_html/occ app:update --all
Maybe you will have to replace “www-data” by the owner of your Nextclod-files depending on the Nexclod installation.

sorry for the long delay in getting back to this thread… (putting out fires)…

In any case, @j-ed were close to being right… it was a misconfiguration of memcache. (after a failed upgrade to php8.1 I hadn’t switch the default php cli back to 7.4. and I had mismatched php-memcahce modules.

I switched the default php-cli from php-8.1 back to 7.4, them reinstalled the php7.4-memcache* modules.

All is well now.

Appreciate the feedback.