Skip to content

"General error: 5 database is locked" while uploading small files #12429

Closed

Description

@dttpy

Expected behaviour

No error message while uploading small files, and the thumbnail of the files can be shown directly after the end of uploading.

Actual behaviour

8 small files were planed to be uploaded. While uploading the files (step 2 below), an error message is shown:

exception occurred while executing 'UPDATE "oc_filecache" SET "size"=? WHERE "fileid" = ?':  SQLSTATE[HY000]: General error: 5 database is locked

Because of this error, after the end of the upload, it shows the sum of files in the folder is 7, and after refreshing the page, the "invisible" file is back, the the sum of files is 8.
This problem comes always accidently. Sometimes 2 error messages can be shown while uploading 5 files, but sometimes it works fine, even by uploading 100 files.

Here is the link of the test files. They are all the small ".gif" files with the average size: 5 kb. http://db.tt/Yat97nN

Steps to reproduce

  1. create a folder and go inside it
  2. upload several small files, in my case 8 files
  3. If there is no error message, repeat the second step, else: refresh the page

Server configuration

Operating system: Ubuntu 13.10

Web server: apache 2.4.6 (Ubuntu)

Database: SQLite

PHP version: 5.5.3-1ubuntu2.3

ownCloud version: 7.0.3

Updated from an older ownCloud or fresh install: from 7.0.3rc

List of activated app:standard apps of owncloud 7.0.3 and encryption

The content of config/config.php: (Without the database password and passwordsalt)
$CONFIG = array (
'instanceid' => 'oc6d9cda6e26',

'datadirectory' => '/var/ocdata/***/owncloud/data',
'dbtype' => 'sqlite3',
'version' => '7.0.3.4',
'installed' => true,
'theme' => '',
'maintenance' => false,
'maxZipInputSize' => 838860800,
'allowZipDownload' => true,
'loglevel' => '0',
'trusted_domains' =>
array (
0 => '192.168.1.80',
),
);

Are you using external storage, if yes which one: no

Client configuration

Browser: firefox 33.1.1

Operating system: ubuntu 13.10

Logs

Web server error log

ownCloud log (data/owncloud.log)

{"reqId":"5474d56d31135","app":"search_lucene","message":"searching hits for pk:91d8d5b505c818592ad87975085a82d1","level":0,"time":"2014-11-25T19:15:57+00:00","method":"GET","url":"\/owncloud703\/cron.php"}
{"reqId":"5474d56d31135","app":"search_lucene","message":"found 0 hits ","level":0,"time":"2014-11-25T19:15:57+00:00","method":"GET","url":"\/owncloud703\/cron.php"}
{"reqId":"5474d56e16692","app":"core","message":"OC_Image::loadFromFileHandle(): Trying","level":0,"time":"2014-11-25T19:15:58+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2F%2F1.txt&c=53bea5bed1155&x=36&y=36&forceIcon=0"}
{"reqId":"5474d56e16692","app":"core","message":"OC_Image->fixOrientation() No readable file path set.","level":0,"time":"2014-11-25T19:15:58+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2F%2F1.txt&c=53bea5bed1155&x=36&y=36&forceIcon=0"}
{"reqId":"5474d56e16c11","app":"core","message":"OC_Image::loadFromFileHandle(): Trying","level":0,"time":"2014-11-25T19:15:58+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2F%2Fnew.txt&c=53beb76180a40&x=36&y=36&forceIcon=0"}
{"reqId":"5474d56e16692","app":"core","message":"OC_Image->fixOrientation() Orientation: -1","level":0,"time":"2014-11-25T19:15:58+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2F%2F1.txt&c=53bea5bed1155&x=36&y=36&forceIcon=0"}
{"reqId":"5474d56e16c11","app":"core","message":"OC_Image->fixOrientation() No readable file path set.","level":0,"time":"2014-11-25T19:15:58+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2F%2Fnew.txt&c=53beb76180a40&x=36&y=36&forceIcon=0"}
{"reqId":"5474d56e16c11","app":"core","message":"OC_Image->fixOrientation() Orientation: -1","level":0,"time":"2014-11-25T19:15:58+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2F%2Fnew.txt&c=53beb76180a40&x=36&y=36&forceIcon=0"}
{"reqId":"5474d56e1d889","app":"core","message":"OC_Image::loadFromFileHandle(): Trying","level":0,"time":"2014-11-25T19:15:58+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2F%2F%25%5E%26*%28%29.txt&c=53bea5a25c7a4&x=36&y=36&forceIcon=0"}
{"reqId":"5474d56e1d889","app":"core","message":"OC_Image->fixOrientation() No readable file path set.","level":0,"time":"2014-11-25T19:15:58+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2F%2F%25%5E%26*%28%29.txt&c=53bea5a25c7a4&x=36&y=36&forceIcon=0"}
{"reqId":"5474d56e1d889","app":"core","message":"OC_Image->fixOrientation() Orientation: -1","level":0,"time":"2014-11-25T19:15:58+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2F%2F%25%5E%26*%28%29.txt&c=53bea5a25c7a4&x=36&y=36&forceIcon=0"}
{"reqId":"5474d57566518","app":"music","message":"update - \/admin\/files\/as","level":0,"time":"2014-11-25T19:16:05+00:00","method":"POST","url":"\/owncloud703\/index.php\/apps\/files\/ajax\/newfolder.php"}
{"reqId":"5474d58b9b72a","app":"OC\\Files\\Cache\\Scanner","message":"!!! No reuse of etag for 'files_encryption\/keyfiles\/as' !!! \ncache: Array\n(\n    [fileid] => 3165\n    [storage] => home::admin\n    [path] => files_encryption\/keyfiles\/as\n    [parent] => 682\n    [name] => as\n    [mimetype] => httpd\/unix-directory\n    [mimepart] => httpd\n    [size] => 2596\n    [mtime] => 1415345470\n    [storage_mtime] => 1415345470\n    [encrypted] => \n    [unencrypted_size] => 0\n    [etag] => 545c753ef1b7c\n    [permissions] => 31\n)\n \ndata: Array\n(\n    [mimetype] => httpd\/unix-directory\n    [mtime] => 1416942987\n    [size] => -1\n    [etag] => 5474d58b9b477\n    [storage_mtime] => 1416942987\n    [permissions] => 31\n    [parent] => 682\n)\n","level":0,"time":"2014-11-25T19:16:27+00:00","method":"POST","url":"\/owncloud703\/index.php\/apps\/files\/ajax\/upload.php"}
{"reqId":"5474d58b9b72a","app":"OC\\Files\\Cache\\Scanner","message":"!!! No reuse of etag for 'files_encryption\/share-keys\/as' !!! \ncache: Array\n(\n    [fileid] => 3167\n    [storage] => home::admin\n    [path] => files_encryption\/share-keys\/as\n    [parent] => 1899\n    [name] => as\n    [mimetype] => httpd\/unix-directory\n    [mimepart] => httpd\n    [size] => 28160\n    [mtime] => 1415345471\n    [storage_mtime] => 1415345470\n    [encrypted] => \n    [unencrypted_size] => 0\n    [etag] => 545c753f400f4\n    [permissions] => 31\n)\n \ndata: Array\n(\n    [mimetype] => httpd\/unix-directory\n    [mtime] => 1416942987\n    [size] => -1\n    [etag] => 5474d58be498c\n    [storage_mtime] => 1416942987\n    [permissions] => 31\n    [parent] => 1899\n)\n","level":0,"time":"2014-11-25T19:16:27+00:00","method":"POST","url":"\/owncloud703\/index.php\/apps\/files\/ajax\/upload.php"}
{"reqId":"5474d58b9b72a","app":"music","message":"update - \/admin\/files\/as\/3m_sie.gif","level":0,"time":"2014-11-25T19:16:28+00:00","method":"POST","url":"\/owncloud703\/index.php\/apps\/files\/ajax\/upload.php"}
{"reqId":"5474d58b9b72a","app":"music","message":"update - mimetype image\/gif","level":0,"time":"2014-11-25T19:16:28+00:00","method":"POST","url":"\/owncloud703\/index.php\/apps\/files\/ajax\/upload.php"}
{"reqId":"5474d58d98645","app":"music","message":"update - \/admin\/files\/as\/8p.gif","level":0,"time":"2014-11-25T19:16:29+00:00","method":"POST","url":"\/owncloud703\/index.php\/apps\/files\/ajax\/upload.php"}
{"reqId":"5474d58d98645","app":"music","message":"update - mimetype image\/gif","level":0,"time":"2014-11-25T19:16:29+00:00","method":"POST","url":"\/owncloud703\/index.php\/apps\/files\/ajax\/upload.php"}
{"reqId":"5474d58da908c","app":"OC\\Files\\Cache\\Scanner","message":"!!! Path 'thumbnails\/4106' is not readable !!!","level":0,"time":"2014-11-25T19:16:29+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2F3m_sie.gif&c=5474d58b745dc&x=36&y=36&forceIcon=0"}
{"reqId":"5474d58da908c","app":"core","message":"Generating preview for \"\/as\/3m_sie.gif\" with \"OC\\Preview\\Image\"","level":0,"time":"2014-11-25T19:16:29+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2F3m_sie.gif&c=5474d58b745dc&x=36&y=36&forceIcon=0"}
{"reqId":"5474d58da908c","app":"PHP","message":"exif_read_data(e5c4677a5ef04a6de52447589bda54c1gif): File not supported at \/var\/www\/owncloud703\/lib\/private\/image.php#326","level":0,"time":"2014-11-25T19:16:29+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2F3m_sie.gif&c=5474d58b745dc&x=36&y=36&forceIcon=0"}
{"reqId":"5474d58da908c","app":"core","message":"OC_Image->fixOrientation() Orientation: -1","level":0,"time":"2014-11-25T19:16:29+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2F3m_sie.gif&c=5474d58b745dc&x=36&y=36&forceIcon=0"}
{"reqId":"5474d58e012f5","app":"OC\\Files\\Cache\\Scanner","message":"!!! Path 'thumbnails\/4109' is not readable !!!","level":0,"time":"2014-11-25T19:16:30+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2F8p.gif&c=5474d58d11063&x=36&y=36&forceIcon=0"}
{"reqId":"5474d58e012f5","app":"core","message":"Generating preview for \"\/as\/8p.gif\" with \"OC\\Preview\\Image\"","level":0,"time":"2014-11-25T19:16:30+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2F8p.gif&c=5474d58d11063&x=36&y=36&forceIcon=0"}
{"reqId":"5474d58e012f5","app":"PHP","message":"exif_read_data(20be67717c0d57b18baf4b0718563963gif): File not supported at \/var\/www\/owncloud703\/lib\/private\/image.php#326","level":0,"time":"2014-11-25T19:16:30+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2F8p.gif&c=5474d58d11063&x=36&y=36&forceIcon=0"}
{"reqId":"5474d58e012f5","app":"core","message":"OC_Image->fixOrientation() Orientation: -1","level":0,"time":"2014-11-25T19:16:30+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2F8p.gif&c=5474d58d11063&x=36&y=36&forceIcon=0"}
{"reqId":"5474d58ee8652","app":"music","message":"update - \/admin\/files\/as\/aniolek.gif","level":0,"time":"2014-11-25T19:16:30+00:00","method":"POST","url":"\/owncloud703\/index.php\/apps\/files\/ajax\/upload.php"}
{"reqId":"5474d58ee8652","app":"music","message":"update - mimetype image\/gif","level":0,"time":"2014-11-25T19:16:30+00:00","method":"POST","url":"\/owncloud703\/index.php\/apps\/files\/ajax\/upload.php"}
{"reqId":"5474d58f18eae","app":"OC\\Files\\Cache\\Scanner","message":"!!! Path 'thumbnails\/4114' is not readable !!!","level":0,"time":"2014-11-25T19:16:31+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Faniolek.gif&c=5474d58e0ae06&x=36&y=36&forceIcon=0"}
{"reqId":"5474d58f18eae","app":"core","message":"Generating preview for \"\/as\/aniolek.gif\" with \"OC\\Preview\\Image\"","level":0,"time":"2014-11-25T19:16:31+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Faniolek.gif&c=5474d58e0ae06&x=36&y=36&forceIcon=0"}
{"reqId":"5474d58f18eae","app":"PHP","message":"exif_read_data(b61720104ca0e9c7a0609c0429ba8fbdgif): File not supported at \/var\/www\/owncloud703\/lib\/private\/image.php#326","level":0,"time":"2014-11-25T19:16:31+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Faniolek.gif&c=5474d58e0ae06&x=36&y=36&forceIcon=0"}
{"reqId":"5474d58f18eae","app":"core","message":"OC_Image->fixOrientation() Orientation: -1","level":0,"time":"2014-11-25T19:16:31+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Faniolek.gif&c=5474d58e0ae06&x=36&y=36&forceIcon=0"}
{"reqId":"5474d58fdbdce","app":"music","message":"update - \/admin\/files\/as\/aparat.gif","level":0,"time":"2014-11-25T19:16:31+00:00","method":"POST","url":"\/owncloud703\/index.php\/apps\/files\/ajax\/upload.php"}
{"reqId":"5474d58fdbdce","app":"music","message":"update - mimetype image\/gif","level":0,"time":"2014-11-25T19:16:31+00:00","method":"POST","url":"\/owncloud703\/index.php\/apps\/files\/ajax\/upload.php"}
{"reqId":"5474d5901cec1","app":"OC\\Files\\Cache\\Scanner","message":"!!! Path 'thumbnails\/4119' is not readable !!!","level":0,"time":"2014-11-25T19:16:32+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Faparat.gif&c=5474d58f21761&x=36&y=36&forceIcon=0"}
{"reqId":"5474d5901cec1","app":"core","message":"Generating preview for \"\/as\/aparat.gif\" with \"OC\\Preview\\Image\"","level":0,"time":"2014-11-25T19:16:32+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Faparat.gif&c=5474d58f21761&x=36&y=36&forceIcon=0"}
{"reqId":"5474d5901cec1","app":"PHP","message":"exif_read_data(6af36cd1646306ebbeb8186d1fb9e75egif): File not supported at \/var\/www\/owncloud703\/lib\/private\/image.php#326","level":0,"time":"2014-11-25T19:16:32+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Faparat.gif&c=5474d58f21761&x=36&y=36&forceIcon=0"}
{"reqId":"5474d5901cec1","app":"core","message":"OC_Image->fixOrientation() Orientation: -1","level":0,"time":"2014-11-25T19:16:32+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Faparat.gif&c=5474d58f21761&x=36&y=36&forceIcon=0"}
{"reqId":"5474d59150677","app":"music","message":"update - \/admin\/files\/as\/bezradny.gif","level":0,"time":"2014-11-25T19:16:33+00:00","method":"POST","url":"\/owncloud703\/index.php\/apps\/files\/ajax\/upload.php"}
{"reqId":"5474d59150677","app":"music","message":"update - mimetype image\/gif","level":0,"time":"2014-11-25T19:16:33+00:00","method":"POST","url":"\/owncloud703\/index.php\/apps\/files\/ajax\/upload.php"}
{"reqId":"5474d591708e1","app":"OC\\Files\\Cache\\Scanner","message":"!!! Path 'thumbnails\/4129' is not readable !!!","level":0,"time":"2014-11-25T19:16:33+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Fbezradny.gif&c=5474d590b95d8&x=36&y=36&forceIcon=0"}
{"reqId":"5474d591708e1","app":"core","message":"Generating preview for \"\/as\/bezradny.gif\" with \"OC\\Preview\\Image\"","level":0,"time":"2014-11-25T19:16:33+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Fbezradny.gif&c=5474d590b95d8&x=36&y=36&forceIcon=0"}
{"reqId":"5474d591708e1","app":"PHP","message":"exif_read_data(75d9d99b387bd2eaecb49327f7b56907gif): File not supported at \/var\/www\/owncloud703\/lib\/private\/image.php#326","level":0,"time":"2014-11-25T19:16:33+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Fbezradny.gif&c=5474d590b95d8&x=36&y=36&forceIcon=0"}
{"reqId":"5474d591708e1","app":"core","message":"OC_Image->fixOrientation() Orientation: -1","level":0,"time":"2014-11-25T19:16:33+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Fbezradny.gif&c=5474d590b95d8&x=36&y=36&forceIcon=0"}
{"reqId":"5474d591708e1","app":"core","message":"An exception occurred while executing 'UPDATE \"oc_filecache\" SET \"size\"=? WHERE \"fileid\" = ?':\n\nSQLSTATE[HY000]: General error: 5 database is locked","level":0,"time":"2014-11-25T19:16:33+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Fbezradny.gif&c=5474d590b95d8&x=36&y=36&forceIcon=0"}
{"reqId":"5474d5925705b","app":"music","message":"update - \/admin\/files\/as\/bije.gif","level":0,"time":"2014-11-25T19:16:34+00:00","method":"POST","url":"\/owncloud703\/index.php\/apps\/files\/ajax\/upload.php"}
{"reqId":"5474d5925705b","app":"music","message":"update - mimetype image\/gif","level":0,"time":"2014-11-25T19:16:34+00:00","method":"POST","url":"\/owncloud703\/index.php\/apps\/files\/ajax\/upload.php"}
{"reqId":"5474d5927b213","app":"OC\\Files\\Cache\\Scanner","message":"!!! Path 'thumbnails\/4132' is not readable !!!","level":0,"time":"2014-11-25T19:16:34+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Fbije.gif&c=5474d59177907&x=36&y=36&forceIcon=0"}
{"reqId":"5474d5927b213","app":"core","message":"Generating preview for \"\/as\/bije.gif\" with \"OC\\Preview\\Image\"","level":0,"time":"2014-11-25T19:16:34+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Fbije.gif&c=5474d59177907&x=36&y=36&forceIcon=0"}
{"reqId":"5474d5927b213","app":"PHP","message":"exif_read_data(fde32564b8662bc7742769517cae9934gif): File not supported at \/var\/www\/owncloud703\/lib\/private\/image.php#326","level":0,"time":"2014-11-25T19:16:34+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Fbije.gif&c=5474d59177907&x=36&y=36&forceIcon=0"}
{"reqId":"5474d5927b213","app":"core","message":"OC_Image->fixOrientation() Orientation: -1","level":0,"time":"2014-11-25T19:16:34+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Fbije.gif&c=5474d59177907&x=36&y=36&forceIcon=0"}
{"reqId":"5474d5936f484","app":"music","message":"update - \/admin\/files\/as\/boisie.gif","level":0,"time":"2014-11-25T19:16:35+00:00","method":"POST","url":"\/owncloud703\/index.php\/apps\/files\/ajax\/upload.php"}
{"reqId":"5474d5936f484","app":"music","message":"update - mimetype image\/gif","level":0,"time":"2014-11-25T19:16:35+00:00","method":"POST","url":"\/owncloud703\/index.php\/apps\/files\/ajax\/upload.php"}
{"reqId":"5474d593895e3","app":"OC\\Files\\Cache\\Scanner","message":"!!! Path 'thumbnails\/4137' is not readable !!!","level":0,"time":"2014-11-25T19:16:35+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Fboisie.gif&c=5474d59284448&x=36&y=36&forceIcon=0"}
{"reqId":"5474d593895e3","app":"core","message":"Generating preview for \"\/as\/boisie.gif\" with \"OC\\Preview\\Image\"","level":0,"time":"2014-11-25T19:16:35+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Fboisie.gif&c=5474d59284448&x=36&y=36&forceIcon=0"}
{"reqId":"5474d593895e3","app":"PHP","message":"exif_read_data(fc479aabb5d7688357cb6e70f007038agif): File not supported at \/var\/www\/owncloud703\/lib\/private\/image.php#326","level":0,"time":"2014-11-25T19:16:35+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Fboisie.gif&c=5474d59284448&x=36&y=36&forceIcon=0"}
{"reqId":"5474d593895e3","app":"core","message":"OC_Image->fixOrientation() Orientation: -1","level":0,"time":"2014-11-25T19:16:35+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Fboisie.gif&c=5474d59284448&x=36&y=36&forceIcon=0"}
{"reqId":"5474d5a145efa","app":"OC\\Files\\Cache\\Scanner","message":"!!! Path 'thumbnails\/4124' is not readable !!!","level":0,"time":"2014-11-25T19:16:49+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Fbeczy.gif&c=5474d59026542&x=36&y=36&forceIcon=0"}
{"reqId":"5474d5a145efa","app":"core","message":"Generating preview for \"\/as\/beczy.gif\" with \"OC\\Preview\\Image\"","level":0,"time":"2014-11-25T19:16:49+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Fbeczy.gif&c=5474d59026542&x=36&y=36&forceIcon=0"}
{"reqId":"5474d5a149046","app":"core","message":"OC_Image::loadFromFileHandle(): Trying","level":0,"time":"2014-11-25T19:16:49+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2F3m_sie.gif&c=5474d58b745dc&x=36&y=36&forceIcon=0"}
{"reqId":"5474d5a149046","app":"core","message":"OC_Image->fixOrientation() No readable file path set.","level":0,"time":"2014-11-25T19:16:49+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2F3m_sie.gif&c=5474d58b745dc&x=36&y=36&forceIcon=0"}
{"reqId":"5474d5a149046","app":"core","message":"OC_Image->fixOrientation() Orientation: -1","level":0,"time":"2014-11-25T19:16:49+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2F3m_sie.gif&c=5474d58b745dc&x=36&y=36&forceIcon=0"}
{"reqId":"5474d5a145efa","app":"PHP","message":"exif_read_data(bfaf06253a954e9b040ced71245e09f4gif): File not supported at \/var\/www\/owncloud703\/lib\/private\/image.php#326","level":0,"time":"2014-11-25T19:16:49+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Fbeczy.gif&c=5474d59026542&x=36&y=36&forceIcon=0"}
{"reqId":"5474d5a145efa","app":"core","message":"OC_Image->fixOrientation() Orientation: -1","level":0,"time":"2014-11-25T19:16:49+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Fbeczy.gif&c=5474d59026542&x=36&y=36&forceIcon=0"}
{"reqId":"5474d5a184166","app":"core","message":"OC_Image::loadFromFileHandle(): Trying","level":0,"time":"2014-11-25T19:16:49+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Faparat.gif&c=5474d58f21761&x=36&y=36&forceIcon=0"}
{"reqId":"5474d5a184166","app":"core","message":"OC_Image->fixOrientation() No readable file path set.","level":0,"time":"2014-11-25T19:16:49+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Faparat.gif&c=5474d58f21761&x=36&y=36&forceIcon=0"}
{"reqId":"5474d5a184166","app":"core","message":"OC_Image->fixOrientation() Orientation: -1","level":0,"time":"2014-11-25T19:16:49+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Faparat.gif&c=5474d58f21761&x=36&y=36&forceIcon=0"}
{"reqId":"5474d5a191da8","app":"core","message":"OC_Image::loadFromFileHandle(): Trying","level":0,"time":"2014-11-25T19:16:49+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2F8p.gif&c=5474d58d11063&x=36&y=36&forceIcon=0"}
{"reqId":"5474d5a191da8","app":"core","message":"OC_Image->fixOrientation() No readable file path set.","level":0,"time":"2014-11-25T19:16:49+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2F8p.gif&c=5474d58d11063&x=36&y=36&forceIcon=0"}
{"reqId":"5474d5a191da8","app":"core","message":"OC_Image->fixOrientation() Orientation: -1","level":0,"time":"2014-11-25T19:16:49+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2F8p.gif&c=5474d58d11063&x=36&y=36&forceIcon=0"}
{"reqId":"5474d5a19d00e","app":"core","message":"OC_Image::loadFromFileHandle(): Trying","level":0,"time":"2014-11-25T19:16:49+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Fbezradny.gif&c=5474d590b95d8&x=36&y=36&forceIcon=0"}
{"reqId":"5474d5a19d00e","app":"core","message":"OC_Image->fixOrientation() No readable file path set.","level":0,"time":"2014-11-25T19:16:49+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Fbezradny.gif&c=5474d590b95d8&x=36&y=36&forceIcon=0"}
{"reqId":"5474d5a19d00e","app":"core","message":"OC_Image->fixOrientation() Orientation: -1","level":0,"time":"2014-11-25T19:16:49+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Fbezradny.gif&c=5474d590b95d8&x=36&y=36&forceIcon=0"}
{"reqId":"5474d5a1a734a","app":"core","message":"OC_Image::loadFromFileHandle(): Trying","level":0,"time":"2014-11-25T19:16:49+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Faniolek.gif&c=5474d58e0ae06&x=36&y=36&forceIcon=0"}
{"reqId":"5474d5a1a734a","app":"core","message":"OC_Image->fixOrientation() No readable file path set.","level":0,"time":"2014-11-25T19:16:49+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Faniolek.gif&c=5474d58e0ae06&x=36&y=36&forceIcon=0"}
{"reqId":"5474d5a1a734a","app":"core","message":"OC_Image->fixOrientation() Orientation: -1","level":0,"time":"2014-11-25T19:16:49+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Faniolek.gif&c=5474d58e0ae06&x=36&y=36&forceIcon=0"}
{"reqId":"5474d5a1b0d78","app":"core","message":"OC_Image::loadFromFileHandle(): Trying","level":0,"time":"2014-11-25T19:16:49+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Fbije.gif&c=5474d59177907&x=36&y=36&forceIcon=0"}
{"reqId":"5474d5a1b0d78","app":"core","message":"OC_Image->fixOrientation() No readable file path set.","level":0,"time":"2014-11-25T19:16:49+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Fbije.gif&c=5474d59177907&x=36&y=36&forceIcon=0"}
{"reqId":"5474d5a1b0d78","app":"core","message":"OC_Image->fixOrientation() Orientation: -1","level":0,"time":"2014-11-25T19:16:49+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Fbije.gif&c=5474d59177907&x=36&y=36&forceIcon=0"}
{"reqId":"5474d5a1b6426","app":"core","message":"OC_Image::loadFromFileHandle(): Trying","level":0,"time":"2014-11-25T19:16:49+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Fboisie.gif&c=5474d59284448&x=36&y=36&forceIcon=0"}
{"reqId":"5474d5a1b6426","app":"core","message":"OC_Image->fixOrientation() No readable file path set.","level":0,"time":"2014-11-25T19:16:49+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Fboisie.gif&c=5474d59284448&x=36&y=36&forceIcon=0"}
{"reqId":"5474d5a1b6426","app":"core","message":"OC_Image->fixOrientation() Orientation: -1","level":0,"time":"2014-11-25T19:16:49+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Fboisie.gif&c=5474d59284448&x=36&y=36&forceIcon=0"}

Activity

  1. PVince81 commented on Nov 25, 2014

    @PVince81
    Contributor

    In the middle of the log:

    {"reqId":"5474d591708e1","app":"core","message":"An exception occurred while executing 'UPDATE \"oc_filecache\" SET \"size\"=? WHERE \"fileid\" = ?':\n\nSQLSTATE[HY000]: General error: 5 database is locked","level":0,"time":"2014-11-25T19:16:33+00:00","method":"GET","url":"\/owncloud703\/index.php\/core\/preview.png?file=%2Fas%2Fbezradny.gif&c=5474d590b95d8&x=36&y=36&forceIcon=0"}
    

    It seems that what happens is as follows: while a file is being uploaded, the preview of another is being read. The upload itself is triggering the scanner with a potential database lock, and sometimes the preview generation triggers it.

    @butonic @icewind1991 I thought we managed to increase the SQLite lock timeout somehow ?

    Also I find it strange that the file preview would even need the database, maybe it's only to read the mime type ? CC @georgehrke @LukasReschke

  2. LukasReschke commented on Nov 25, 2014

    @LukasReschke
    Contributor

    @PVince81 I really have no idea about SQLite3 internals and I don't really feel about digging into that myself extensively.

    I for one consider it still as not the best idea to have SQLite3 as default set. But anyways…

  3. PVince81 commented on Nov 26, 2014

    @PVince81
    Contributor

    About releasing resources: #10566

  4. LukasReschke commented on Nov 26, 2014

    @LukasReschke
    Contributor

    Absolute wild guess, maybe the WAL mode might help here by making things faster (though obviously not a fix but a work-around). Introduced with #12420

    Would be interesting to see the impacts. @Arno01 @dttpy Can you try to reproduce this with the newest master which has this patch applied and get back with feedback to us?

  5. LukasReschke commented on Nov 26, 2014

    @LukasReschke
    Contributor

    Very strange since this works just fine for me locally. On which hardware is this running? Which PHP versions? Which SQLite version? etc...

  6. PVince81 commented on Jan 22, 2015

    @PVince81
    Contributor

    It looks like this call does not exist in Doctrine.
    I wonder if it's possible to call busyTimeout() on whichever wrapped object Doctrine might be using for the SQLite connection (there is no such code there, I grepped it).

  7. 5 remaining items

  8. PVince81 commented on Jan 29, 2015

    @PVince81
    Contributor

    From what I see here it seems to happen mostly when writing the thumbnail entries in oc_filecache, and that triggers an update of the parent folder's size in the file cache. Not sure whether this is really necessary when outside of "files/":

    {
        "reqId":"6c2d000c4971b876c2dab876d5bc3718",
        "remoteAddr":"192.168.1.2",
        "app":"index",
        "message":"Exception: {\"Message\":\"An exception occurred while executing ' UPDATE \\"oc_filecache\\" SET \\"size\\"=? WHERE \\"fileid\\" = ?' with params [170672, 20]:SQLSTATE[HY000]: General error: 5 database is locked\",\"Code\":0,
    \"Trace\":\"
        #0 /var/ocdata/vincent/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(116): Doctrine\\DBAL\\Driver\\AbstractSQLiteDriver->convertException('An exception oc...', Object(Doctrine\\DBAL\\Driver\\PDOException))
        #1 /var/ocdata/vincent/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Statement.php(172): Doctrine\\DBAL\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\DBAL\\Driver\\PDOSqlite\\Driver), Object(Doctrine\\DBAL\\Driver\\PDOException), 'UPDATE \\"oc_file...', Array)
        #2 /var/ocdata/vincent/owncloud/lib/private/db/statementwrapper.php(63): Doctrine\\DBAL\\Statement->execute(Array)
        #3 /var/ocdata/vincent/owncloud/lib/private/db.php(141): OC_DB_StatementWrapper->execute(Array)
        #4 /var/ocdata/vincent/owncloud/lib/private/files/cache/cache.php(271): OC_DB::executeAudited('UPDATE `*PREFIX...', Array)
        #5 /var/ocdata/vincent/owncloud/lib/private/files/cache/cache.php(616): OC\\Files\\Cache\\Cache->update(20, Array)
        #6 /var/ocdata/vincent/owncloud/lib/private/files/cache/homecache.php(21): OC\\Files\\Cache\\Cache->calculateFolderSize('thumbnails', NULL)
        #7 /var/ocdata/vincent/owncloud/lib/private/files/cache/cache.php(569): OC\\Files\\Cache\\HomeCache->calculateFolderSize('thumbnails', NULL)
        #8 /var/ocdata/vincent/owncloud/lib/private/files/cache/cache.php(575): OC\\Files\\Cache\\Cache->correctFolderSize('thumbnails')
        #9 /var/ocdata/vincent/owncloud/lib/private/files/cache/cache.php(575): OC\\Files\\Cache\\Cache->correctFolderSize('thumbnails/575')
        #10 /var/ocdata/vincent/owncloud/lib/private/files/cache/updater.php(56): OC\\Files\\Cache\\Cache->correctFolderSize('thumbnails/575/...', Array)
        #11 /var/ocdata/vincent/owncloud/lib/private/files/view.php(810): OC\\Files\\Cache\\Updater->update('/thumbnails/575...')
        #12 /var/ocdata/vincent/owncloud/lib/private/files/view.php(422): OC\\Files\\View->basicOperation('file_put_conten...', 'thumbnails/575/...', Array, 'GIF89a$?$??????...')
        #13 /var/ocdata/vincent/owncloud/lib/private/preview.php(540): OC\\Files\\View->file_put_contents('thumbnails/575/...', 'GIF89a$?$??????...')
        #14 /var/ocdata/vincent/owncloud/lib/private/preview.php(565): OC\\Preview->getPreview()
        #15 /var/ocdata/vincent/owncloud/core/ajax/preview.php(44): OC\\Preview->showPreview()
        #16 /var/ocdata/vincent/owncloud/lib/private/route/route.php(135) : runtime-created function(1): require_once('/var/ocdata/vin...')
        #17 [internal function]: __lambda_func(Array)
        #18 /var/ocdata/vincent/owncloud/lib/private/route/router.php(250): call_user_func('?lambda_1490', Array)
        #19 /var/ocdata/vincent/owncloud/lib/base.php(763): OC\\Route\\Router->match('/core/preview.p...')
        #20 /var/ocdata/vincent/owncloud/index.php(28): OC::handleRequest()
        #21 {main}\",\"File\":\"/var/ocdata/vincent/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractSQLiteDriver.php\",\"Line\":84
    }","level":4,"time":"2014-11-28T07:36:31+00:00"}
    

    In general it looks like there are still too many DB queries done (independently from SQLite)

  9. PVince81 commented on Jan 29, 2015

    @PVince81
    Contributor

    Potential fix here: #13752

    Seemed to make the exception disappear in our local env.

  10. PVince81 commented on Jan 29, 2015

    @PVince81
    Contributor

    @Arno01 @hanspeter-heeb are you able to test with the patch from #13752 ?

  11. MorrisJobke commented on Jan 29, 2015

    @MorrisJobke
    Contributor

    Fixed with #13752

  12. added this to the milestone on Jan 29, 2015
  13. res3066 commented on Feb 6, 2015

    @res3066

    Here's an additional datapoint even though the issue is closed - I discovered this same problem in 7.0.4 while uploading an archive of vcf contacts via the Mac's calendar - an upload of 604 contacts resulted in only 511 in ownCloud. I won't bore you with the details of my platform since my hunch here based on previous experience with sqlite3 is that the people above who pointed out the lack of setting a busy timeout are right - I could find no evidence that this is being set when I read the 7.0.4 source. If you don't do this and two writes bump heads, one will immediately fail rather than retrying for any period of time.

    Please consider adding a call to sqlite3_busy_timeout() as part of setup. I couldn't figure out where the right place was to crock this in or I would have tested it myself (lousy programmer here I know, sorry). https://www.sqlite.org/c3ref/busy_timeout.html

  14. PVince81 commented on Feb 6, 2015

    @PVince81
    Contributor

    @res3066 not all "database is locked" issues are related to busy timeouts.

    Sometimes it's due to internal deadlocks.
    Would you mind posting the exact error so we can identify what SQL query it was ? (just in case)

  15. res3066 commented on Feb 6, 2015

    @res3066

    @PVince81 - Sure. Many lines along the lines of:
    {"app":"contacts","message":"OCA\Contacts\Backend\Database::createContact, exception: An exception occurred while executing 'INSERT INTO "oc_contacts_cards" ("addressbookid","fullname","carddata","uri","lastmodified") VALUES(?,?,?,?,?)':\n\nSQLSTATE[HY000]: General error: 5 database is locked","level":3,"time":"2015-02-05T02:59:20+00:00"}

    in owncloud.log, as well as this in nginx's error.log:

    2015/02/04 20:22:29 [error] 43164#0: *8734 upstream timed out (145: Connection timed out) while reading response header from upstream, client: 192.0.2.30, server: xxx.example.com, request: "PUT /remote.php/caldav/calendars/rs/rs-cumulus/EE629A90-87D6-4E84-96E4-F0F06DF3065F.ics HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "xxx.example.com"

    Is busy timeout actually explicitly set somewhere that I'm not seeing or inherited somewhere as a value other than "no spinwait"?

  16. PVince81 commented on Feb 6, 2015

    @PVince81
    Contributor

    Is isn't, but this PR could add it back: #13615

  17. res3066 commented on Feb 6, 2015

    @res3066

    I'd support that choice. If there ends up being something that I could pull and test with sqlite3, I have an environment where the behavior is very repeatable. Many thanks.

  18. divinity76 commented on Jan 7, 2016

    @divinity76

    im getting the same issue on an unrelated project, this info might help you understand the issue (i came from google)..
    when 1 process in the middle of a transaction crashes, unable to end the transaction, and a new process try to execute an INSERT to the same db, the INSERT will hang until some timeout (in my case, 1 minute 1 second), and issue the error "General error: 5 database is locked" -- i can delete this message on request

  19. lock commented on Aug 7, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  20. locked as resolved and limited conversation to collaborators on Aug 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions