Database is locked

Hi , i receive from owncloud desktop agent un message error : No connection to owncloud. Connection closed.

I look to the log here what i find…

Can someone help me with &?

PHP_ERROR.LOG
[13-Jul-2018 17:23:29 UTC] PHP Fatal error: Uncaught exception ‘PDOException’ with message ‘SQLSTATE[HY000]: General error: 5 database is locked’ in C:\wamp\www\owncloud\3rdparty\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOStatement.php:91

OWNCLOUD.LOG

{“reqId”:“060b62278fc7966a7f23c32a5dad5ff4”,“remoteAddr”:“10.72.64.36”,“app”:“remote”,“message”:“An exception occurred while executing 'UPDATE “oc_filecache” SET “size”=? WHERE (“size” <> ? ) AND “fileid” = ? ’ with params [13566, 13566, 75775]:\n\nSQLSTATE[HY000]: General error: 5 database is locked”,“level”:4,“time”:“2018-07-13T17:58:11+00:00”}
{“reqId”:“35651c2eddd4dc3bf49eb06fedae9472”,“remoteAddr”:“192.168.1.129”,“app”:“remote”,“message”:“An exception occurred while executing 'UPDATE “oc_filecache” SET “mtime” = ?, “etag”=? WHERE (“mtime” <> ? OR “etag” <> ? ) AND “fileid” = ? ’ with params [“1531504147”, “5b48e81005c9f”, “1531504147”, “5b48e81005c9f”, “11160”]:\n\nSQLSTATE[HY000]: General error: 5 database is locked”,“level”:4,“time”:“2018-07-13T17:58:42+00:00”}
{“reqId”:“cf3c63a7ae17ab0693bad9d39428a79e”,“remoteAddr”:“10.104.160.86”,“app”:“remote”,“message”:“An exception occurred while executing 'UPDATE “oc_filecache” SET “mtime” = ?, “etag”=? WHERE (“mtime” <> ? OR “etag” <> ? ) AND “fileid” = ? ’ with params [1531504665, “5b48e8196c763”, 1531504665, “5b48e8196c763”, “11158”]:\n\nSQLSTATE[HY000]: General error: 5 database is locked”,“level”:4,“time”:“2018-07-13T17:58:51+00:00”}
{“reqId”:“a5180640887127b2376cfc10345e75b0”,“remoteAddr”:“10.32.208.31”,“app”:“hook”,“message”:“error while running hook (OCA\Files_Versions\Hooks::write_hook): An exception occurred while executing 'UPDATE “oc_filecache” SET “size”=? WHERE (“size” <> ? ) AND “fileid” = ? ’ with params [1911703, 1911703, 11274]:\n\nSQLSTATE[HY000]: General error: 5 database is locked”,“level”:3,“time”:“2018-07-13T17:59:07+00:00”}
{“reqId”:“e3bb24c0b6113f0ffe45a886dd8ad345”,“remoteAddr”:“10.82.64.34”,“app”:“remote”,“message”:“An exception occurred while executing ‘DELETE FROM “oc_file_map” WHERE “physic_path” LIKE ? ESCAPE ‘\’’ with params [“C:\\wamp\\www\\owncloud\\data\/pacsmonitor@christieinnomed.com\/files\/results\/c-29\/ipsentrylogs-crshedc1.txt%”]:\n\nSQLSTATE[HY000]: General error: 5 database is locked”,“level”:4,“time”:“2018-07-13T17:59:09+00:00”}
{“reqId”:“2807fea24b47ce02435cf84ee8d29945”,“remoteAddr”:“192.168.1.129”,“app”:“hook”,“message”:“error while running hook (OCA\Files_Versions\Hooks::write_hook): An exception occurred while executing 'UPDATE “oc_filecache” SET “size”=? WHERE (“size” <> ? ) AND “fileid” = ? ’ with params [756544, 756544, 11322]:\n\nSQLSTATE[HY000]: General error: 5 database is locked”,“level”:3,“time”:“2018-07-13T17:59:07+00:00”}
{“reqId”:“023c1d22402a18e1a45e0c5718a8bfd9”,“remoteAddr”:“192.168.1.129”,“app”:“remote”,“message”:“An exception occurred while executing ‘INSERT INTO “oc_file_map” (“logic_path”, “physic_path”, “logic_path_hash”, “physic_path_hash”)\n\t\t\t\tVALUES (?, ?, ?, ?)’ with params [“C:\\wamp\\www\\owncloud\\data\/pacsmonitor@christieinnomed.com\/files_trashbin\/files\/backupexectape-CRSHEPACS2.txt.d1531504693”, “C:\\wamp\\www\\owncloud\\data\/pacsmonitor@christieinnomed.com\/files-trashbin\/files\/backupexectape-crshepacs2.txt.d1531504693”, “28cd09d72a90a9baf0aff85d29b3a487”, “1d2a696d7495adfba71215213d7fd46d”]:\n\nSQLSTATE[HY000]: General error: 5 database is locked”,“level”:4,“time”:“2018-07-13T17:59:19+00:00”}
{“reqId”:“c4548d17d5938eb8427fd2037161c67c”,“remoteAddr”:“192.168.1.129”,“app”:“remote”,“message”:“An exception occurred while executing ‘DELETE FROM “oc_filecache” WHERE “fileid” = ?’ with params [143768]:\n\nSQLSTATE[HY000]: General error: 5 database is locked”,“level”:4,“time”:“2018-07-13T18:02:28+00:00”}
{“reqId”:“a9f1cef9752705c4b99ae8b3b05f87e6”,“remoteAddr”:“192.168.1.129”,“app”:“webdav”,“message”:“Exception: {“Message”:“expected filesize 37 got 0”,“Code”:0,“Trace”:”#0 C:\\wamp\\www\\owncloud\\3rdparty\\sabre\\dav\\lib\\Sabre\\DAV\\Server.php(888): OC_Connector_Sabre_File->put(Resource id #395)\n#1 [internal function]: Sabre\\DAV\\Server->httpPut(‘Results\/c-73\/ba…’)\n#2 C:\\wamp\\www\\owncloud\\3rdparty\\sabre\\dav\\lib\\Sabre\\DAV\\Server.php(474): call_user_func(Array, ‘Results\/c-73\/ba…’)\n#3 C:\\wamp\\www\\owncloud\\3rdparty\\sabre\\dav\\lib\\Sabre\\DAV\\Server.php(214): Sabre\\DAV\\Server->invokeMethod(‘PUT’, ‘Results\/c-73\/ba…’)\n#4 C:\\wamp\\www\\owncloud\\apps\\files\\appinfo\\remote.php(61): Sabre\\DAV\\Server->exec()\n#5 C:\\wamp\\www\\owncloud\\remote.php(54): require_once(‘C:\\\\wamp\\\\www\\\\own…’)\n#6 {main}",“File”:“C:\\wamp\\www\\owncloud\\lib\\private\\connector\\sabre\\file.php”,“Line”:130}",“level”:4,“time”:“2018-07-13T18:02:31+00:00”}
{“reqId”:“1ece74b1a1b9be9a2a0de406595c701f”,“remoteAddr”:“10.89.83.15”,“app”:“webdav”,“message”:“Exception: {“Message”:“expected filesize 78 got 0”,“Code”:0,“Trace”:”#0 C:\\wamp\\www\\owncloud\\3rdparty\\sabre\\dav\\lib\\Sabre\\DAV\\Server.php(888): OC_Connector_Sabre_File->put(Resource id #395)\n#1 [internal function]: Sabre\\DAV\\Server->httpPut(‘Results\/c-68\/ba…’)\n#2 C:\\wamp\\www\\owncloud\\3rdparty\\sabre\\dav\\lib\\Sabre\\DAV\\Server.php(474): call_user_func(Array, ‘Results\/c-68\/ba…’)\n#3 C:\\wamp\\www\\owncloud\\3rdparty\\sabre\\dav\\lib\\Sabre\\DAV\\Server.php(214): Sabre\\DAV\\Server->invokeMethod(‘PUT’, ‘Results\/c-68\/ba…’)\n#4 C:\\wamp\\www\\owncloud\\apps\\files\\appinfo\\remote.php(61): Sabre\\DAV\\Server->exec()\n#5 C:\\wamp\\www\\owncloud\\remote.php(54): require_once(‘C:\\\\wamp\\\\www\\\\own…’)\n#6 {main}",“File”:“C:\\wamp\\www\\owncloud\\lib\\private\\connector\\sabre\\file.php”,“Line”:130}",“level”:4,“time”:“2018-07-13T18:02:37+00:00”}
{“reqId”:“532f7a7467d2231fb814cf9b98ffc522”,“remoteAddr”:“192.168.1.129”,“app”:“remote”,“message”:“An exception occurred while executing ‘DELETE FROM “oc_filecache” WHERE “fileid” = ?’ with params [143069]:\n\nSQLSTATE[HY000]: General error: 5 database is locked”,“level”:4,“time”:“2018-07-13T18:03:32+00:00”}
{“reqId”:“09a30c54131fe25806706cf0147c4d8e”,“remoteAddr”:“10.104.131.12”,“app”:“hook”,“message”:“error while running hook (\OC\Files\Cache\Shared_Updater::deleteHook): An exception occurred while executing ‘DELETE FROM “oc_filecache” WHERE “fileid” = ?’ with params [143786]:\n\nSQLSTATE[HY000]: General error: 5 database is locked”,“level”:3,“time”:“2018-07-13T18:03:46+00:00”}
{“reqId”:“09a30c54131fe25806706cf0147c4d8e”,“remoteAddr”:“10.104.131.12”,“app”:“remote”,“message”:“An exception occurred while executing ‘INSERT INTO “oc_file_map” (“logic_path”, “physic_path”, “logic_path_hash”, “physic_path_hash”)\n\t\t\t\tVALUES (?, ?, ?, ?)’ with params [“C:\\wamp\\www\\owncloud\\data\/pacsmonitor@christieinnomed.com\/files\/_trashbin\/files\/backupexecdisk-CRSHEPACS2.txt.d1531505026”, “C:\\wamp\\www\\owncloud\\data\/pacsmonitor@christieinnomed.com\/files\/trashbin\/files\/backupexecdisk-crshepacs2.txt.d1531505026”, “73e33300951946873010fa013ce9d939”, “f1f3dc277b7b95316ef3928f3c07361e”]:\n\nSQLSTATE[HY000]: General error: 5 database is locked”,“level”:4,“time”:“2018-07-13T18:03:46+00:00”}
{“reqId”:“93e8d39e7a968f6baf9a32089200e3e1”,“remoteAddr”:“192.168.1.129”,“app”:“remote”,“message”:“An exception occurred while executing 'UPDATE “oc_filecache” SET “size”=? WHERE (“size” <> ? ) AND “fileid” = ? ’ with params [18036872, 18036872, 11160]:\n\nSQLSTATE[HY000]: General error: 5 database is locked”,“level”:4,“time”:“2018-07-13T18:04:22+00:00”}
{“reqId”:“580fc11fed230f68a9f7eb9c9eed5721”,“remoteAddr”:“192.168.1.129”,“app”:“remote”,“message”:“An exception occurred while executing 'UPDATE “oc_filecache” SET “size”=? WHERE (“size” <> ? ) AND “fileid” = ? ’ with params [754616, 754616, 11322]:\n\nSQLSTATE[HY000]: General error: 5 database is locked”,“level”:4,“time”:“2018-07-13T18:04:32+00:00”}
{“reqId”:“9bf89777e636db4d79b3d9d8b715fcc1”,“remoteAddr”:“10.82.64.34”,“app”:“hook”,“message”:“error while running hook (OCA\Files_Versions\Hooks::write_hook): An exception occurred while executing 'UPDATE “oc_filecache” SET “size”=? WHERE (“size” <> ? ) AND “fileid” = ? ’ with params [13556, 13556, 75733]:\n\nSQLSTATE[HY000]: General error: 5 database is locked”,“level”:3,“time”:“2018-07-13T18:05:13+00:00”}
{“reqId”:“deb9071d13527b1cbd1a015cf1ea3e6e”,“remoteAddr”:“192.168.1.129”,“app”:“remote”,“message”:“An exception occurred while executing ‘DELETE FROM “oc_filecache” WHERE “fileid” = ?’ with params [143684]:\n\nSQLSTATE[HY000]: General error: 5 database is locked”,“level”:4,“time”:“2018-07-13T18:05:34+00:00”}
{“reqId”:“d988d05cde6171c2bad43bca5eaacb11”,“remoteAddr”:“192.168.1.40”,“app”:“remote”,“message”:“An exception occurred while executing ‘DELETE FROM “oc_filecache” WHERE “fileid” = ?’ with params [142921]:\n\nSQLSTATE[HY000]: General error: 5 database is locked”,“level”:4,“time”:“2018-07-13T18:06:01+00:00”}

Hey,

i did the following search:

https://www.google.com/search?q=“General+error%3A+5+database+is+locked”

and found quite a lot posts on the internet about this issue with SQLite. It looks to me like SQLite can’t handle the requirements of your ownCloud usage and doing a fresh installation of ownCloud with MySQL should solve this.

1 Like