Nextcloud 17.0.2 update failed

I started the update to 17.0.2 from the UI, but it failed and I’m stuck in “maintenance mode”.

When I’m using the occ tool in command line (sudo -u www-data php occ upgrade), I get the following errors.

Set log level to debug
Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'CREATE TEMPORARY TABLE __temp__oc_file_locks AS SELECT id, lock, "key", ttl FROM oc_file_locks': SQLSTATE[HY000]: General error: 11 database disk image is malformed
Update failed
Maintenance mode is kept active
Reset log level

I’ve tried maintenance:repair, but it doesn’t seem to do anything.

Any ideas on how to fix this?

1 Like ?

It’s certainly something with your sqlite (" database disk image is malformed") as indicated by the other answer too. According to some it might be sufficient to reboot to repair the database. If it’s not you probably will need a database integrity checking tool for sqlite.