503 error after upgrade to 27.1.4

Support intro

Unfortunately, the update to 27.1.4 coincided with the concurrent update to php 8.1.26.

# sudo -u www occ upgrade
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
Setting log level to debug
Turned on maintenance mode
Updating database schema
Updated database
Update app recognize from App Store
ld-elf.so.1: /usr/local/lib/php/20210902/apcu.so: Undefined symbol "php_pcre2_match_data_create_from_pattern"

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: 27.1.4
Operating system and version: FreeBSD 13.2-RELEASE
Nginx version: 1.24.0_12,3
PHP version: 8.1.26 (php-fpm)

The issue you are facing:
I can’t complete the update. The Nextcloud instance is offline

Is this the first time you’ve seen this error? Y

Steps to replicate it:

  1. Upgrade Nextcloud to version 27.1.4
  2. Upgrade php to version 8.1.26
  3. run occ upgrade
  4. restart nginx and php-fpm
  5. attempt to open Dashboard

The output of your Nextcloud log in Admin > Logging:

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

$CONFIG = array (
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/usr/local/www/nextcloud/apps',
      'url' => '/apps',
      'writable' => true,
    1 => 
    array (
      'path' => '/usr/local/www/nextcloud/apps-pkg',
      'url' => '/apps-pkg',
      'writable' => false,
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'instanceid' => 'oc4k8d00tjnj',
  'passwordsalt' => '***',
  'secret' => '****',
  'trusted_domains' => 
  array (
    0 => '',
    1 => 'wx.schamschula.com',
  'datadirectory' => '/tank/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => '',
  'dbname' => 'nextcloud_db',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud_user',
  'dbpassword' => 'tJIYmYz60GlT',
  'installed' => true,
  'trashbin_retention_obligation' => 'auto, 30',
  'theme' => '',
  'loglevel' => 0,
  'maintenance' => true,

The output of your nginx log:

2023/11/26 11:13:19 [error] 45344#100932: *662 upstream timed out (60: Operation timed out) while reading upstream, client:, server: wx.schamschula.com, request: "GET /nextcloud/core/ajax/update.php?requesttoken=%2Fb8Ri6MAlCDX0JgwaLx5%2FGp7CzUDmltAVfC024UBlcs%3D%3Au9hk3NBQuxC%2BmvpWHdAXrws2ZgRN1xQ0AbbdrvdRw4A%3D HTTP/1.1", upstream: "fastcgi://127.0.0.
1:9000", host: ""
2023/11/26 11:13:53 [error] 45344#100932: *686 open() "/usr/local/www/nginx/apps/theming/img/background/kamil-porembinski-clouds.jpg" failed (2: No such file or directory), client:, server: wx.schamschula.com, request: "GET /apps/theming/img/background/kamil-porembinski-clouds.jpg HTTP/1.1", host: ""

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.


I just noticed a path issue:

The second error (although it shouldn’t be the real problem here) the request

request: "GET /apps/theming/img/background/kamil-porembinski-clouds.jpg HTTP/1.1", host: ""

should have been

request: "GET /apps-pkg/theming/img/background/kamil-porembinski-clouds.jpg HTTP/1.1", host: ""

May be related to Kein Login Fenster nach Update auf 27.1.4 - #8 by gmt-it

Indeed, the main issue was with a PHP package: php81-pecl-APCu

I manually revision bumped and rebuilt it. The

ld-elf.so.1: /usr/local/lib/php/20210902/apcu.so: Undefined symbol "php_pcre2_match_data_create_from_pattern"

error went away when I ran occ upgrade

Can you please tell me more in detail what you did to solve the issue?

There were two problems here:

  1. the path issue. I think Kein Login Fenster nach Update auf 27.1.4 - #8 by gmt-it has more information on this. The error persists.

  2. the issue with the FreeBSD port of php81-pecl-APCu, which I solved by rebuilding this package after upgrading PHP to version 8.1.26. This revision bump was missed by the upstream package maintainers at FreeBSD. As I’m writing this my build machine is updating PHP yet again. I’l see if I have to repeat than local rebuild one more time.

1 Like

Hey thanks for reporting this. I ran into this error trying to upgrade as well. Unfortunately this solution is probably going to be for a limited number of people. My nextcloud is build within a freebsd jail under TrueNas Core – which is a bsd distribution.

I first checked by php version and it reported php 8.2. So I did the follow:
$ sudo pkg install --force php82-pecl-APCu

This simply reinstalled be package and the error went away trying to upgrade. I appreciate all the help that went into reporting this error and it saved me tons of time debugging. Upgrading nextcloud seems to always be a pain.