OwnCloud crash: Failed to connect to the database

Expected behaviour

I was uploading some files on my OwnCloud account and a warning appeared, after refresh I got the errors present bellow. Now I can’t access to anything on the OwnCloud app.

Server configuration

Operating system:
Debian / Linux

Web server:
1&1

Database:
SQ Lite

PHP version:
PHP 5.6

Where did you install ownCloud from:
Installed on a 1&1 online server

The content of config/config.php:

$CONFIG = array (
  'debug' => true,
  'instanceid' => '-',
  'passwordsalt' => '-',
  'secret' => '-',
  'trusted_domains' =>
  array (
    0 => '-.com',
    1 => 'drive.-.com',
  ),
  'datadirectory' => '/homepages/2/-/htdocs/drive/data',
  'overwrite.cli.url' => 'http://-.com/drive',
  'dbtype' => 'sqlite3',
  'version' => '10.0.10.4',
  'logtimezone' => 'UTC',
'installed' => true,
  'mail_from_address' => 'admin',
  'mail_smtpmode' => 'php',
  'mail_domain' => '-.com',
  'loglevel' => 2,
  'maintenance' => false,
  'theme' => '',
);

ownCloud log (data/owncloud.log)

{"reqId":"XHJtllKlVoIAACxCJ3wAAAAY","level":3,"time":"2019-02-24T10:10:31+00:00","remoteAddr":"91.162.248.209","user":"admin","app":"PHP","method":"POST","url":"\/index.php\/heartbeat","message":"Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php:\/\/input stream instead. at Unknown#0"}
{"reqId":"XHJzc1KlVoIAAEWMxA0AAAAK","level":3,"time":"2019-02-24T10:35:31+00:00","remoteAddr":"91.162.248.209","user":"admin","app":"PHP","method":"POST","url":"\/index.php\/heartbeat","message":"Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php:\/\/input stream instead. at Unknown#0"}
{"reqId":"XHJ5TlKlVoIAACvVnjAAAAAR","level":3,"time":"2019-02-24T11:00:31+00:00","remoteAddr":"91.162.248.209","user":"admin","app":"PHP","method":"POST","url":"\/index.php\/heartbeat","message":"Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php:\/\/input stream instead. at Unknown#0"}
{"reqId":"XHJ-KlKlVoIAAB5rZ0EAAAAB","level":3,"time":"2019-02-24T11:25:31+00:00","remoteAddr":"91.162.248.209","user":"admin","app":"PHP","method":"POST","url":"\/index.php\/heartbeat","message":"Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php:\/\/input stream instead. at Unknown#0"}
{"reqId":"XHKFBlKlVoIAAItMZhcAAAAR","level":3,"time":"2019-02-24T11:50:31+00:00","remoteAddr":"91.162.248.209","user":"admin","app":"PHP","method":"POST","url":"\/index.php\/heartbeat","message":"Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php:\/\/input stream instead. at Unknown#0"}
{"reqId":"XHKK4lKlVoIAACdXBwYAAAAX","level":3,"time":"2019-02-24T12:15:31+00:00","remoteAddr":"91.162.248.209","user":"admin","app":"PHP","method":"POST","url":"\/index.php\/heartbeat","message":"Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php:\/\/input stream instead. at Unknown#0"}
{"reqId":"XHOC7lKlVoIAABeuye0AAAAE","level":3,"time":"2019-02-25T05:53:51+00:00","remoteAddr":"91.162.248.209","user":"admin","app":"PHP","method":"POST","url":"\/index.php\/heartbeat","message":"Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php:\/\/input stream instead. at Unknown#0"}
{"reqId":"XHOIylKlVoIAAAbQf0UAAAAd","level":3,"time":"2019-02-25T06:18:51+00:00","remoteAddr":"91.162.248.209","user":"admin","app":"PHP","method":"POST","url":"\/index.php\/heartbeat","message":"Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php:\/\/input stream instead. at Unknown#0"}
{"reqId":"XHOOp1KlVoIAAFqHACQAAAAA","level":3,"time":"2019-02-25T06:43:51+00:00","remoteAddr":"91.162.248.209","user":"admin","app":"PHP","method":"POST","url":"\/index.php\/heartbeat","message":"Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php:\/\/input stream instead. at Unknown#0"}
{"reqId":"XHOUglKlVoIAACsSEaAAAAAU","level":3,"time":"2019-02-25T07:08:51+00:00","remoteAddr":"91.162.248.209","user":"admin","app":"PHP","method":"POST","url":"\/index.php\/heartbeat","message":"Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php:\/\/input stream instead. at Unknown#0"}
{"reqId":"XHUN@VKlVoIAAEWJlX0AAAAW","level":4,"time":"2019-02-26T09:59:25+00:00","remoteAddr":"91.162.248.209","user":"admin","app":"webdav","method":"MOVE","url":"\/remote.php\/dav\/uploads\/admin\/web-file-upload-b20061dbde0a15b3fc3a36be903ef88b-1551172763620\/.file","message":"Exception: HTTP\/1.1 500 An exception occurred while executing 'UPDATE \"oc_file_locks\" SET \"lock\" = 1, \"ttl\" = ? WHERE \"key\" = ? AND \"lock\" = -1' with params [1551178765, \"files\\\/20f4dc488d97e034676052f5e8e7e4b1\"]:\n\nSQLSTATE[HY000]: General error: 10 disk I\/O error: {\"Exception\":\"Sabre\\\\DAV\\\\Exception\",\"Message\":\"An exception occurred while executing 'UPDATE \\\"oc_file_locks\\\" SET \\\"lock\\\" = 1, \\\"ttl\\\" = ? WHERE \\\"key\\\" = ? AND \\\"lock\\\" = -1' with params [1551178765, \\\"files\\\\\\\/20f4dc488d97e034676052f5e8e7e4b1\\\"]:\\n\\nSQLSTATE[HY000]: General error: 10 disk I\\\/O error\",\"Code\":0,\"Trace\":\"#0 \\\/homepages\\\/2\\\/d618979521\\\/htdocs\\\/drive\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/File.php(234): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File->convertToSabreException(Object(Doctrine\\\\DBAL\\\\Exception\\\\DriverException))\\n#1 \\\/homepages\\\/2\\\/d618979521\\\/htdocs\\\/drive\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/Directory.php(172): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File->put(Resource id #588)\\n#2 \\\/homepages\\\/2\\\/d618979521\\\/htdocs\\\/drive\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Tree.php(314): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Directory->createFile('Tales of Zestir...', Resource id #588)\\n#3 \\\/homepages\\\/2\\\/d618979521\\\/htdocs\\\/drive\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Tree.php(130): Sabre\\\\DAV\\\\Tree->copyNode(Object(OCA\\\\DAV\\\\Upload\\\\FutureFile), Object(OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Directory), 'Tales of Zestir...')\\n#4 \\\/homepages\\\/2\\\/d618979521\\\/htdocs\\\/drive\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Tree.php(161): Sabre\\\\DAV\\\\Tree->copy('uploads\\\/admin\\\/w...', 'files\\\/admin\\\/Vid...')\\n#5 \\\/homepages\\\/2\\\/d618979521\\\/htdocs\\\/drive\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(642): Sabre\\\\DAV\\\\Tree->move('uploads\\\/admin\\\/w...', 'files\\\/admin\\\/Vid...')\\n#6 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpMove(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#7 \\\/homepages\\\/2\\\/d618979521\\\/htdocs\\\/drive\\\/lib\\\/composer\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#8 \\\/homepages\\\/2\\\/d618979521\\\/htdocs\\\/drive\\

Browser log

Exception occurred while logging exception: Failed to connect to the database: An exception occurred while executing 'PRAGMA journal_mode = WAL': SQLSTATE[HY000]: General error: 14 unable to open database file
#0 /homepages/2/d618979521/htdocs/drive/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(992): OC\DB\Connection->connect()
#1 /homepages/2/d618979521/htdocs/drive/lib/private/DB/Connection.php(207): Doctrine\DBAL\Connection->executeUpdate('PRAGMA read_unc...', Array, Array)
#2 /homepages/2/d618979521/htdocs/drive/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): OC\DB\Connection->executeUpdate('PRAGMA read_unc...')
#3 /homepages/2/d618979521/htdocs/drive/lib/private/DB/Connection.php(144): Doctrine\DBAL\Connection->setTransactionIsolation(2)
#4 /homepages/2/d618979521/htdocs/drive/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOSqlite\Driver), Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
#5 /homepages/2/d618979521/htdocs/drive/lib/private/DB/ConnectionFactory.php(146): Doctrine\DBAL\DriverManager::getConnection(Array, Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
#6 /homepages/2/d618979521/htdocs/drive/lib/private/Server.php(529): OC\DB\ConnectionFactory->getConnection('sqlite3', Array)
#7 /homepages/2/d618979521/htdocs/drive/lib/composer/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC\{closure}(Object(OC\Server))
#8 /homepages/2/d618979521/htdocs/drive/lib/private/AppFramework/Utility/SimpleContainer.php(108): Pimple\Container->offsetGet('DatabaseConnect...')
#9 /homepages/2/d618979521/htdocs/drive/lib/private/ServerContainer.php(86): OC\AppFramework\Utility\SimpleContainer->query('DatabaseConnect...')
#10 /homepages/2/d618979521/htdocs/drive/lib/private/Server.php(1213): OC\ServerContainer->query('DatabaseConnect...')
#11 /homepages/2/d618979521/htdocs/drive/lib/private/Server.php(404): OC\Server->getDatabaseConnection()
#12 /homepages/2/d618979521/htdocs/drive/lib/composer/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC\{closure}(Object(OC\Server))
#13 /homepages/2/d618979521/htdocs/drive/lib/private/AppFramework/Utility/SimpleContainer.php(108): Pimple\Container->offsetGet('AppConfig')
#14 /homepages/2/d618979521/htdocs/drive/lib/private/ServerContainer.php(86): OC\AppFramework\Utility\SimpleContainer->query('AppConfig')
#15 /homepages/2/d618979521/htdocs/drive/lib/private/Server.php(1143): OC\ServerContainer->query('AppConfig')
#16 /homepages/2/d618979521/htdocs/drive/lib/private/Server.php(583): OC\Server->getAppConfig()
#17 /homepages/2/d618979521/htdocs/drive/lib/composer/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC\{closure}(Object(OC\Server))
#18 /homepages/2/d618979521/htdocs/drive/lib/private/AppFramework/Utility/SimpleContainer.php(108): Pimple\Container->offsetGet('AppManager')
#19 /homepages/2/d618979521/htdocs/drive/lib/private/ServerContainer.php(86): OC\AppFramework\Utility\SimpleContainer->query('AppManager')
#20 /homepages/2/d618979521/htdocs/drive/lib/private/Server.php(1411): OC\ServerContainer->query('AppManager')
#21 /homepages/2/d618979521/htdocs/drive/lib/private/legacy/app.php(346): OC\Server->getAppManager()
#22 /homepages/2/d618979521/htdocs/drive/lib/private/legacy/app.php(110): OC_App::getEnabledApps()
#23 /homepages/2/d618979521/htdocs/drive/lib/base.php(577): OC_App::loadApps(Array)
#24 /homepages/2/d618979521/htdocs/drive/lib/base.php(994): OC::init()
#25 /homepages/2/d618979521/htdocs/drive/index.php(53): require_once('/homepages/2/d6...')
#26 {main}

Thank you for your help!

the $ sign means the end of your console window. Please either download the log file and look for errors or make a cat on the log file and copy it in a text editor.

Ah yes sorry, I just edited the topic with the full log.

I think its a disk Problem. Your error: General error: 10 disk. Check the used space. Is it more then 256 GB, ask 1&1.

Those “some files” would be of interest, and the warning you got.

On my dashboard, it’s written I use 850 Go / unlimited and 82 122 / 262 144 files

It was an SQL error but I don’t remember the error notice, I was uploading mp4 files.

I don’t know why but now ownCloud works…