Some issues after 21.0.3 upgrade

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version: 21.0.3
Operating system and version: Ubuntu 20.04.2 LTS
Apache or nginx version: Caddy server v2.3.0
PHP version: 7.4.3

The issue you are facing:
Cannot update missing indices.

Is this the first time you’ve seen this error? (Y/N): Yes

Steps to replicate it:

  1. sudo -u www-data php occ db:add-missing-indices

The output of your Nextcloud log in Admin > Logging:

(no idea where I can find that info)

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

  'memcache.local' => '\\OC\\Memcache\\APCu',

The output of your Apache/nginx/system log in /var/log/____:

command-line output:
An unhandled exception has been thrown:
OC\HintException: [0]: Memcache \OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)

Additional info:
I upgraded from 20.0.11 (I think, latest), then to 21.0.3, which arrived yesterday (I waited for it to appear in “stable”, as I was trying to avoid issues like these).

There was a 2nd problem after this upgrade: cron ceased to work. I switched to AJAX, the only option which made the error message go away (“cron has not run for 2 days”).

Update - as mentioned in the guide, the cron issue can be fixed by adding --define apc.enable_cli=1 to the cron job. It’s odd that this change is needed after the upgrade, but at least it seems to solve the cron issue.

1 Like

To follow up: this problem can be fixed by adding this:


to /etc/php7.4/cli/conf.d/20-apci.ini. As mentioned here.

In summary: everything is working now, but these issues were unexpected for a 21.0.3 release, i.e. after several months of deploymeny and a few revisions.

Suggestion: perhaps consider adding extra tests to the upgrade scripts to catch this?


@jcw thanks for catching this and I agree
Same issue on Ubuntu 18.04 - PHP7.4 - NC v21.0.3


same issue here after upgrade NC 21.0.2 to 21.0.3
Operating system and version: Ubuntu 20.04.2 LTS
nginx version: 1.18.0-0ubuntu1.2
PHP version: 7.3.29

web server reports ‘Internal server error’ and occ command-line output:

OC\HintException: [0]: Memcache \OC\Memcache\APCu not available for local cache (Is the matching PHP module installed and enabled?)

I tried the solutions proposed here (and else where) without success, what finally worked for me is to (temporarily?) disable Memory caching (both APCu and Redis) by commenting/removing the lines in
# ‘memcache.local’ => ‘\OC\Memcache\APCu’,
# ‘memcache.locking’ => ‘\OC\Memcache\Redis’,

=> not a final fix, but may help others to get their Nextcloud install back online :wink:

There seems to be typo in this solution. According to the linked solution, the file is 20-apcu.ini rather than 20-apci.ini.

Thanks though @jcw - this thread solved the same problem for me.