Cannot configure memory cache

Nextcloud version (eg, 12.0.2): 16.0.3
Operating system and version (eg, Ubuntu 17.04): Debian 9 (stretch)
Apache or nginx version (eg, Apache 2.4.25): nginx/1.10.3
PHP version (eg, 7.1): 7.2.20

The issue you are facing:

When I add 'memcache.local' => '\\OC\\Memcache\\APCu', to config.php my instance is showing internal server error. When I leave it away in config.php the Nextcloud is telling me that no PHP-Memory-Cache has been defined.

My /etc/php/7.2/fpm/php.ini has been added the following rows:

opcache.enable=1
opcache.enable_cli=1
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.memory_consumption=128
opcache.save_comments=1
opcache.revalidate_freq=1

Is this the first time you’ve seen this error? (Y/N): No, but the first time I didn’t get it fixed by using official documentation.

The output of your Nextcloud log in Admin > Logging:

[remote] Error: OC\HintException: Memcache \OC\Memcache\APCu not available for local cache at <<closure>>

 0. /var/www/nextcloud/lib/private/Server.php line 510
    OC\Memcache\Factory->__construct("c1dc70db9a85982d954c91eec23ed9b7", OC\Log {}, "\\OC\\Memcache\\APCu", "\\OC\\Memcache\\APCu", null)
 1. /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php line 118
    OC\Server->OC\{closure}("*** sensitive parameters replaced ***")
 2. /var/www/nextcloud/lib/private/ServerContainer.php line 125
    Pimple\Container->offsetGet("OC\\Memcache\\Factory")
 3. /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php line 165
    OC\ServerContainer->query("OC\\Memcache\\Factory")
 4. /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php line 114
    OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}("*** sensitive parameters replaced ***")
 5. /var/www/nextcloud/lib/private/ServerContainer.php line 125
    Pimple\Container->offsetGet("MemCacheFactory")
 6. /var/www/nextcloud/lib/private/Server.php line 1541
    OC\ServerContainer->query("MemCacheFactory")
 7. /var/www/nextcloud/lib/private/Server.php line 697
    OC\Server->getMemCacheFactory()
 8. /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php line 118
    OC\Server->OC\{closure}("*** sensitive parameters replaced ***")
 9. /var/www/nextcloud/lib/private/ServerContainer.php line 125
    Pimple\Container->offsetGet("OC\\App\\AppManager")
10. /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php line 165
    OC\ServerContainer->query("OC\\App\\AppManager")
11. /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php line 114
    OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}("*** sensitive parameters replaced ***")
12. /var/www/nextcloud/lib/private/ServerContainer.php line 125
    Pimple\Container->offsetGet("AppManager")
13. /var/www/nextcloud/lib/private/Server.php line 1731
    OC\ServerContainer->query("AppManager")
14. /var/www/nextcloud/lib/private/legacy/app.php line 343
    OC\Server->getAppManager()
15. /var/www/nextcloud/lib/private/legacy/app.php line 114
    OC_App::getEnabledApps()
16. /var/www/nextcloud/lib/base.php line 640
    OC_App::loadApps(["session"])
17. /var/www/nextcloud/lib/base.php line 1056
    OC::init()
18. /var/www/nextcloud/status.php line 36
    undefinedundefinedrequire_once("/var/www/nextcloud/lib/base.php")

GET /status.php
from **sensitive information** at 2019-07-16T12:58:10+00:00

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

<?php
$CONFIG = array (
  'instanceid' => '**sensitive information**',
  'passwordsalt' => '**sensitive information**',
  'secret' => '**sensitive information**',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => '**sensitive information**',
  ),
  'datadirectory' => '/media/usbhdd-a/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '16.0.3.0',
  'overwrite.cli.url' => 'http://localhost',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_**sensitive information**',
  'dbpassword' => '**sensitive information**',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'server',
  'mail_domain' => 'pc-fee.com',
  'mail_smtpport' => '465',
  'mail_smtphost' => '**sensitive information**',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtpname' => '**sensitive information**',
  'mail_smtppassword' => '**sensitive information**',
  'mail_smtpsecure' => 'ssl',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
);

Steps to reproduce:

  1. Tried to upgrade NC to version 16.0.3
  2. Required to upgrade PHP to version 7.2

Any idea how to get it fixed?

Kind regards
//neph

Found the issue. As I upgraded from PHP7 to PHP7.2 I forgot to upgrade php-apcu. Did it by now and restarted nginx and php7.2-fpm service to finish the upgrade of that module.

Now it is working as expected. Advise to configure memory cache has disappeared.