NextCloudPi keeps enabling maintenance mode

Hello everyone,
my NCP keeps setting itself into maintenance mode (“This Nextcloud instance is currently in maintenance mode, which may take a while.”). I can disable maintenance mode using SSH and “sudo ncp-config” and “nc-maintenance”. That works for some time, but after some hours/days my nextcloud instance stops working and goes offline/into maintenance mode again.

I ran nc-info, what resulted in the following:

pi@nextcloudpi:~ $ sudo ncp-config
Running nc-info
Gathering information...
Nextcloud is in maintenance mode - no apps have been loaded

NextCloudPi version  v1.13.1
NextCloudPi image    NextCloudPi_11-12-17
distribution         Raspbian GNU/Linux 9 \n \l
automount            no
USB devices          sda
datadir              /var/www/nextcloud/data
data in SD           yes
data filesystem      aufs
data disk usage      262G/344G
rootfs usage         262G/344G
swapfile             /dev/zram3
dbdir                /var/lib/mysql
Nextcloud check      ok
Nextcloud version    15.0.5.3
HTTPD service        up
PHP service          up
MariaDB service      up
Redis service        up
Postfix service      up
internet check       ok
port check 80        open
port check 443       open
IP                   192.168.1.24
gateway              192.168.1.1
interface            eth0
certificates         *removed*
NAT loopback         yes
uptime               17days


You should use nc-datadir to move your files to your plugged in USB drive

You should enable automount to use your plugged in USB drive
Done. Press any key...

Any idea what is going wrong here?
What other info do you need to help?
@nachoparker

Output of ncp-report would probably be useful.

I use pastebin for logs and link here.

also /var/log/ncp.log would be useful

Here you go,:
@oliver.:
https://pastebin.com/XMsQn1Bv

@nacho:
https://pastebin.com/gWRRhE2M

At the moment the NC is not in maintenance mode.
I tried to update to the newest NC version yesterday, that failed showing the following. Any ideas? Is that the same problem or a new one?

> Running nc-update-nextcloud
> Current   Nextcloud version 15.0.5.3
> Available Nextcloud version 15.0.8
> Download Nextcloud 15.0.8...
> Back up current instance...
> check free space...
> Maintenance mode enabled
> backup database...
> backup files...
> pigz: abort: write error on <stdout> (No space left on device)
> tar: /var/www//nextcloud-bkp_20190605_1559767739.tar.gz: Wrote only 4096 of 1024                                                                                        0 bytes
> tar: Child returned status 28
> tar: Error is not recoverable: exiting now
> error generating backup
> An unhandled exception has been thrown:
> RedisException: MISCONF Redis is configured to save RDB snapshots, but is curren                                                                                        tly not able to persist on disk. Commands that may modify the data set are disab                                                                                        led. Please check Redis logs for details about the error. in /var/www/nextcloud/                                                                                        lib/private/Memcache/Redis.php:64
> Stack trace:
> #0 /var/www/nextcloud/lib/private/Memcache/Redis.php(64): Redis->setex('63cfcb48                                                                                        d4d26c4...', 60, '["\\/var\\/www\\/n...')
> #1 /var/www/nextcloud/lib/autoloader.php(168): OC\Memcache\Redis->set('OC_User',                                                                                         Array, 60)
> #2 [internal function]: OC\Autoloader->load('OC_User')
> #3 /var/www/nextcloud/lib/private/User/Session.php(223): spl_autoload_call('OC_U                                                                                        ser')
> #4 /var/www/nextcloud/lib/private/L10N/Factory.php(168): OC\User\Session->getUse                                                                                        r()
> #5 /var/www/nextcloud/lib/private/L10N/Factory.php(127): OC\L10N\Factory->findLa                                                                                        nguage('lib')
> #6 /var/www/nextcloud/lib/private/Server.php(1499): OC\L10N\Factory->get('lib',                                                                                         NULL)
> #7 /var/www/nextcloud/lib/base.php(234): OC\Server->getL10N('lib')
> #8 /var/www/nextcloud/lib/base.php(659): OC::checkConfig()
> #9 /var/www/nextcloud/lib/base.php(1068): OC::init()
> #10 /var/www/nextcloud/console.php(46): require_once('/var/www/nextcl...')
> #11 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
> #12 {main}Abort...
> Maintenance mode disabled
> Error backing up
> Clean up...
> Done. Press any key...

Updating through the web updater worked.
But I keep getting an error in the config page of the nextcloud concerning BigInt Identifiers.
https://docs.nextcloud.com/server/15/admin_manual/configuration_database/bigint_identifiers.html
Is that the main problem or just a symptom of the rest?

pi@nextcloudpi:~ $ sudo -u www-data php occ db:convert-filecache-bigint

results in

Could not open input file: occ

I think this was the issue. No space left for the backup and thus no update.

Updating Nextcloud with the web updater when using nextcloudpi, is not recommended. The new issue you see is probably a result of that.

1 Like

Well at least this could give us a clue as to why some few people still keep coming back to maintenance mode periodically.

If they run out of space Nextcloud is not able to go out of maintenance mode.

Shouldnt be there plenty of room for a backup before the update?
How can I reduce the necessary backup space?
@sven: The error on the image also appeared prior to the update through the web updater… Any idea how to fix it?

depends on how much data you have. You can do dataless backups but then you have to find another way to secure your data.

@jonaskor i have no idea why you mention me here, I never had this kind of problem…