PLEASE HELP: Updater stuck in Step 5 - 27.1.3 -> 27.1.4

Nextcloud version (eg, 20.0.5): 27.1.3
Operating system and version (eg, Ubuntu 20.04): Debian 12
Apache or nginx version (eg, Apache 2.4.25): Apache
PHP version (eg, 7.4): 8.1

The issue you are facing:
Step 5 is currently in process. Please reload this page later. It doesn’t change the status even after hours.

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

Steps to replicate it:

  1. Tried to update, got stuck on Step 5.
  2. Now go to updated and see a blank screen with this text.

The output of your Nextcloud log in Admin > Logging:

[no app in context] Error: Sabre\DAV\Exception\BadRequest: Expected filesize of 40960000 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 28663808 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side. at <<closure>>

 0. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php line 149
 1. /var/www/nextcloud/apps/dav/lib/Upload/UploadFolder.php line 50
    OCA\DAV\Connector\Sabre\Directory->createFile("*** sensitive parameters replaced ***")
 2. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1098
    OCA\DAV\Upload\UploadFolder->createFile("*** sensitive parameters replaced ***")
 3. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 504
    Sabre\DAV\Server->createFile("*** sensitive parameters replaced ***")
 4. /var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
 5. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 472
 6. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 253
 7. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321
 8. /var/www/nextcloud/apps/dav/lib/Server.php line 365
 9. /var/www/nextcloud/apps/dav/appinfo/v2/remote.php line 35
10. /var/www/nextcloud/remote.php line 172
    require_once("/var/www/nextcl ... p")

PUT /remote.php/dav/uploads/user123/5dc4a4370cd000899727c011a2d6ca6d/000009
from by 123 at 2023-12-02T11:27:22+00:00

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

$CONFIG = array (
  'passwordsalt' => 'somesalt',
  'secret' => 'somesecret',
  'trusted_domains' => 
  array (
    0 => 'somedomain',
  'datadirectory' => '/somedirectory',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => 'someurl',
  'dbname' => 'nextcloud',
  'dbhost' => '',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'someuser',
  'dbpassword' => 'somepassword',
  'installed' => true,
  'instanceid' => 'someid',
  'default_phone_region' => 'CA',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => '0',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'updater.secret' => 'somescret',

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

[Sat Dec 02 12:16:28.617995 2023] [proxy_fcgi:error] [pid 595] [client] AH01071: Got error 'PHP message: PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 220990456 bytes) in /var/www/nextcloud/updater/index.php on line 692'

Actually I checked my memory_limit is set to 512MB on /etc/php/8.1/apache2/php.ini, but NC is still complaining on Security and setup warnings: The PHP memory limit is below the recommended value of 512MB. For some reason my /etc/php/8.1/fpm/php.ini went to 128mb (not sure if it was an update). So this was overwriting the apacha/php.ini and causing the error. Still after restarting everything (even the machine) I still get this error.

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.


php-fpm (located at /etc/php/8.1/fpm/*) and apache2 module (located at /etc/php/8.1/apache2/*) are two different, mutual exclusive php-sapis.

Read this:

If your update still get stuck in step 5 try this:

Delete (or move) your $datadirectory/updater-$instanceid/.step* file(s) and start update again.

I would suggest to update using the commandline updater script

# change this to the path where your nextcloud is installed:
sudo -u www-data -E php -f "$NC_DIR/updater/updater.phar"

then it will use the php-cli, which uses /etc/php/8.1/cli/php.ini

or you can define a memory limit for that one task like this:

sudo -u www-data -E php -d memory_limit=512M -f "$NC_DIR/updater/updater.phar"

Much luck,


@ernolf very grateful for your answer, and it solved the issue. I just moved the step file you mentioned and restarted the update. Upgrade successful.

I just was a bit coward because I am very used to the web-gui updater, so I did not try the update through shell, but I actually found they are equally well documented, next try maybe.

Thank you.

1 Like

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