Error updating Nextcloud 12.0.3 -> 12.0.4

Support intro

Sorry to hear you’re facing problems :slight_frown:

If you’re urgently looking for support to keep your business running, consider checking out our paid support options.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Remember, the below information may be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Please delete everything above when creating your topic, just provide the following:

Nextcloud version (eg, 12.0.2): 12.0.4
Operating system and version (eg, Ubuntu 17.04): Gentoo
Apache or nginx version (eg, Apache 2.4.25): Lighttpd 1.4.45
PHP version (eg, 7.1): 7.1.11

The issue you are facing: When I run ‘sudo -u lighttpd php occ upgrade’ I get the following error message:

Doctrine\DBAL\Exception\DriverException: An exception occurred while executing ‘CREATE TEMPORARY TABLE __temp__oc_activity AS SELECT activity_id, timestamp, priority, type, user, affecteduser, app, subject, subjectparams, message, messageparams, file, link, object_type, object_id FROM oc_activity’:

SQLSTATE[HY000]: General error: 10 disk I/O error
Update failed

I tried running ‘sudo -u lighttpd php updater.phar’ After changing a lot of file permissions to get it to run, the same error occurs with ‘sudo -u lighttpd php occ upgrade’

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

This is the first upgrade since installing Nextcloud.

Steps to replicate it:

  1. Update Nextcloud using portage
  2. Run ‘sudo -u lighttpd php occ upgrade’ in the Nextcloud directory

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!):

$CONFIG = array (
  'instanceid' => 'XXXX',
  'passwordsalt' => 'XXXX',
  'secret' => 'XXXX',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => '',
    2 => 'XXXXXX',
  'datadirectory' => '/mnt/vault/nextcloud/data',
  'overwrite.cli.url' => 'http://localhost/nextcloud',
  'dbtype' => 'sqlite3',
  'version' => '',
  'installed' => true,
  'integrity.check.disabled' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'filelocking.enabled' => false,
  'theme' => '',
  'loglevel' => 0,
  'maintenance' => true,

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

2018-01-03 03:10:01: (server.c.1534) logfiles cycled UID = 0 PID = 13315 

The performance of sqlite is not great so if possible, you should use mysql or postgresql. Now the error just says it can’t write. Before you try anything else, I’d do a backup first in case something breaks. To avoid any other access to the file, you should turn on maintenance mode first (or stop your webserver).
May I ask how large this file is? (it should be in the data-folder of Nextcloud).

I assume you mean the nextcloud database?

owncloud.db is 7.3Mb