Internal Server Error After Upgrade to Ubuntu 23.10

So, the good news is that I got Nextcloud back up and running, and I have ID’d the issue, but I cannot bring back the setting in the config.php file until the php module is fixed, and it very well be that it’s not compatible with the current ubuntu version.

Anywho, I really need to stop doing major upgrades once they hit. However, I decided to upgrade Ubuntu to v23.10. Once the upgrade was complete, Nextcloud went offline, and I received the following error:

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

I was racking my head for a day as to what it could be because the following error was shown in the apache2 logs:

Restarting web server apache2
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

However, this wasn’t the issue, and I should’ve just listened to the actual error message in the first place because the problem was in fact in the server log, which was the following:

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

So I’ve nailed down the issue, the proplem was with the php-apcu module, which I’ve installed, removed, purged, re-installed, etc. however, nothing seems to be working. I still have that error, unless I comment out the following in my config.php file:

#  'memcache.local' => '\\OC\\Memcache\\APCu', <--------- this is the problem

Once I comment that out, and restart apache, Nextcloud is up and running again. However, from what I’ve seen that setting can greatly improve performance. I’ve looked this issue up, and after re-installing the module, I added the following to the apcu.ini file in the /etc/php/8.2/mods-available directory:

extension=apcu.so
apc.enable_cli=1 <---- added this

Then after uncommenting the above in my config.php file, still no joy, Nextcloud goes offline with the Internal Server Error again. So I have to comment it out again if I want Nextcloud to work. Any thoughts?

Craig

From your post it appears that the PHP APCu module is missing. apt install php-apcu might help, or apt install php8.2-apcu. Of note, the package seems to come from the Universe repos, so make sure those are enabled on your system: How to Enable Universe and Multiverse Repositories in Ubuntu

And one more general note. I would recommend only using LTS releases of Ubuntu on a server. Otherwise you will potentially run into issues like that every half a year, instead of every two or four years :wink:

But I also think these issues are solvable, and with the next upgrade in April 2024 (Version 24.04) you will automatically be on an LTS release again. :slight_smile:

So I have tried both of those commands, and I do have a php-apcu module installed in my mods-available directory… however, you bring up a good point. During the upgrade the third-party repos were disabled, so I wonder if it was grabbing the right one. Let me give er a look see and I will get back to you. Thanks for the help.

waymo

OK, so I removed/purged the php-apcu module again. Then I enabled the universe/muliverse repo, re-installed the module using php8.2-apcu. Then I uncommented the following line in the config.php file:

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

and it went right abck to Internal Server Error again. So I assume that module is not compatible with Ubuntu v23.10 ? I dunno. I do use the LTS distro, however it was a major upgrade so I should’ve waited. Here is what my mods look like.

root@<omitted>:/etc/php/8.2/mods-available# pwd
/etc/php/8.2/mods-available
root@<omitted>:/etc/php/8.2/mods-available# ls
apcu.ini      fileinfo.ini  ldap.ini       readline.ini   tokenizer.ini
bcmath.ini    ftp.ini       mbstring.ini   redis.ini      xml.ini
bz2.ini       gd.ini        mysqli.ini     shmop.ini      xmlreader.ini
calendar.ini  gettext.ini   mysqlnd.ini    simplexml.ini  xmlwriter.ini
ctype.ini     gmp.ini       opcache.ini    smbclient.ini  xsl.ini
curl.ini      iconv.ini     pdo.ini        sockets.ini    zip.ini
dom.ini       igbinary.ini  pdo_mysql.ini  sysvmsg.ini
exif.ini      imagick.ini   phar.ini       sysvsem.ini
ffi.ini       intl.ini      posix.ini      sysvshm.ini

waymo

What happend during the last 30 days ?
Have you surender and rolled back or have you made it work ? Or just completely disabled the cache ?

Finally found the solution today, comment #4 fixed the issue:

I can now uncomment the following line in the config.php and Bob’s your Uncle:

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

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.