Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OC7.0b1: terrible WEBDAV performance - unusable #9351

Closed
MarvinFS opened this issue Jul 2, 2014 · 6 comments
Closed

OC7.0b1: terrible WEBDAV performance - unusable #9351

MarvinFS opened this issue Jul 2, 2014 · 6 comments

Comments

@MarvinFS
Copy link

MarvinFS commented Jul 2, 2014

I'm trying hard to make any real usable & working solution with OC and external storages, no luck so far (except mounted as local storage).
Now have issue with WebDAV - it's terribly slow with one cloud and not working at all with the other.

Steps to reproduce

  1. add a server level external WEBDAV storage - disk.yandex.ru
  2. add a server level external WEBDAV storage - dropbox though dropdav.com (it's free for 14 days)
  3. try to use the resources in OC
  4. try to do the same with internal windows 7,8,8.1 webdav client
  5. try to do the same with cadaver in linux, where the OC is located

Expected behaviour

  1. successfully list files, upload, download, share by webdav in OC
  2. successfully list files, upload, download, share by webdav in Windows
  3. successfully list files, upload, download, share by webdav in Linux

Actual behaviour

when i try to enter the yandex's webdav folders in OC UI, it is waiting for some time and then shows an empty page with no files (but there are several files and folders already). I'm able to create the folders there and upload smaller files, but the speed is just terrible, and i've tried to upload the 650MB iso file - it took several hours (the progress bar filled in about a minute, then the rest of the time it was just waiting, doing nothing), nevertheless, in the end it completed the operation. (i have a 100Mbit internet here)

when i try to enter the dropbox though dropdav.com in OC UI, it is waiting for ages just to give me a initial existing filelist (i have several folders there and about 1000 files)
finally after about 15-20 minutes is shows complete existing filelist, but when i try to upload even small files (about 1-2MB) it takes ages again and i quit waiting after about 30mins...

On the other side from Windows internal webdav client and from cadaver everything works as expected (including filelist and upload download) and very fast!

Server configuration

i've tried on both
ubuntu14LTS
and
ubuntu12LTS

Web server:
apache 2.4

Database:
5.5.37-0ubuntu0.14.04.1 (Ubuntu)
5.5.37-0ubuntu0.12.04.1 (Ubuntu)

PHP version:
PHP 5.5.9-1ubuntu4.2 on UBUNTU14
PHP 5.5.14-1+deb.sury.org~precise+1 on Ubuntu12LTS

ownCloud version:
7.0b1

Updated from an older ownCloud or fresh install:
fresh

List of activated apps:
only defaults

The content of config/config.php:

'oc00bb20a276', 'passwordsalt' => '', 'trusted_domains' => array ( 0 => 'server.us:8443', ), 'datadirectory' => '/var/www/owncloud/data', 'dbtype' => 'mysql', 'version' => '7.0.0.2', 'dbname' => 'ocloud', 'dbhost' => '127.0.0.1', 'dbtableprefix' => 'prefix_', 'dbuser' => 'user', 'dbpassword' => '', 'installed' => true, 'ldapIgnoreNamingRules' => false, 'loglevel' => '0', 'forcessl' => true, 'logtimezone' => 'Asia/Yekaterinburg', 'log_authfailip' => true, 'log_rotate_size' => 10485760, 'debug' => true, 'xframe_restriction' => true, ); **Are you using external storage, if yes which one:** local/smb/sftp/... webdav **Are you using encryption:** yes/no no ### Client configuration **Browser:** firefox 29,30,ie11 **Operating system:** windows 7, windows 8.1 ### Logs When it tries to show yandex filelist or upload files there, it's actually not giving any useful entries in logs, but when it try to access dropdav folder it throws these on both OC servers (both ubuntu12 and 14) ``` {"reqId":"53b3c397e139a","app":"OC\\Files\\Cache\\Scanner","message":"!!! No reuse of etag for '' !!! \ncache: Array\n(\n [fileid] => 91\n [storage] => webdav::user@dav.dropdav.com\/\/\n [path] => \n [parent] => -1\n [name] => \n [mimetype] => httpd\/unix-directory\n [mimepart] => httpd\n [size] => -1\n [mtime] => 1404289941\n [storage_mtime] => 1404289941\n [encrypted] => \n [unencrypted_size] => 0\n [etag] => 53b3c39200543\n [permissions] => 31\n)\n \ndata: Array\n(\n [mimetype] => httpd\/unix-directory\n [mtime] => 1404289954\n [size] => -1\n [etag] => 53b3c39ec79bb\n [storage_mtime] => 1404289954\n [permissions] => 31\n)\n","level":0,"time":"2014-07-02T14:32:35+06:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/ajax\/scan.php?force=false&dir=&requesttoken=55099fa443bf4c21a129"} {"reqId":"53b3c39967a6a","app":"OC\\Files\\Cache\\Scanner","message":"!!! No reuse of etag for '' !!! \ncache: Array\n(\n [fileid] => 91\n [storage] => webdav::user@dav.dropdav.com\/\/\n [path] => \n [parent] => -1\n [name] => \n [mimetype] => httpd\/unix-directory\n [mimepart] => httpd\n [size] => -1\n [mtime] => 1404289954\n [storage_mtime] => 1404289954\n [encrypted] => \n [unencrypted_size] => 0\n [etag] => 53b3c39ec79bb\n [permissions] => 31\n)\n \ndata: Array\n(\n [mimetype] => httpd\/unix-directory\n [mtime] => 1404289960\n [size] => -1\n [etag] => 53b3c3a4c8a2e\n [storage_mtime] => 1404289960\n [permissions] => 31\n)\n","level":0,"time":"2014-07-02T14:32:41+06:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/ajax\/list.php?dir=%2Fdropbox_dav&sort=name&sortdirection=asc"} {"reqId":"53b3c397e139a","app":"core","message":"Exception while scanning file \"Android intro.pdf\": An exception occurred while executing 'INSERT INTO `oc_filecache` (`mimepart`, `mimetype`, `mtime`, `size`, `etag`, `storage_mtime`, `permissions`, `path_hash`, `path`, `parent`, `name`, `storage`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)':\n\nSQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction","level":0,"time":"2014-07-02T14:33:49+06:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/ajax\/scan.php?force=false&dir=&requesttoken=55099fa443bf4c21a129"} {"reqId":"53b3c39967a6a","app":"core","message":"Exception while scanning file \"Android intro.pdf\": An exception occurred while executing 'INSERT INTO `oc_filecache` (`mimepart`, `mimetype`, `mtime`, `size`, `etag`, `storage_mtime`, `permissions`, `path_hash`, `path`, `parent`, `name`, `storage`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)':\n\nSQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction","level":0,"time":"2014-07-02T14:33:50+06:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/ajax\/list.php?dir=%2Fdropbox_dav&sort=name&sortdirection=asc"} {"reqId":"53b3c397e139a","app":"core","message":"Exception while scanning file \"Camera Uploads\": An exception occurred while executing 'INSERT INTO `oc_filecache` (`mimepart`, `mimetype`, `mtime`, `size`, `etag`, `storage_mtime`, `permissions`, `path_hash`, `path`, `parent`, `name`, `storage`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)':\n\nSQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction","level":0,"time":"2014-07-02T14:34:51+06:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/ajax\/scan.php?force=false&dir=&requesttoken=55099fa443bf4c21a129"} {"reqId":"53b3c39967a6a","app":"core","message":"Exception while scanning file \"Camera Uploads\": An exception occurred while executing 'INSERT INTO `oc_filecache` (`mimepart`, `mimetype`, `mtime`, `size`, `etag`, `storage_mtime`, `permissions`, `path_hash`, `path`, `parent`, `name`, `storage`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)':\n\nSQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction","level":0,"time":"2014-07-02T14:34:53+06:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/ajax\/list.php?dir=%2Fdropbox_dav&sort=name&sortdirection=asc"} {"reqId":"53b3c460cef37","app":"PHP","message":"Undefined index: personal at \/var\/www\/owncloud\/apps\/files_external\/lib\/config.php#110","level":3,"time":"2014-07-02T14:35:44+06:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/ajax\/getstoragestats.php?dir=%2FWebDAV%2Ftest2"} {"reqId":"53b3c460cef37","app":"PHP","message":"Undefined index: personal at \/var\/www\/owncloud\/apps\/files_external\/lib\/config.php#110","level":3,"time":"2014-07-02T14:35:44+06:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/ajax\/getstoragestats.php?dir=%2FWebDAV%2Ftest2"} {"reqId":"53b3c460cef37","app":"PHP","message":"Undefined index: personal at \/var\/www\/owncloud\/apps\/files_external\/lib\/config.php#110","level":3,"time":"2014-07-02T14:35:44+06:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/ajax\/getstoragestats.php?dir=%2FWebDAV%2Ftest2"} {"reqId":"53b3c460cef37","app":"PHP","message":"Undefined index: personal at \/var\/www\/owncloud\/apps\/files_external\/lib\/config.php#110","level":3,"time":"2014-07-02T14:35:45+06:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/ajax\/getstoragestats.php?dir=%2FWebDAV%2Ftest2"} {"reqId":"53b3c460cef37","app":"PHP","message":"Undefined index: personal at \/var\/www\/owncloud\/apps\/files_external\/lib\/config.php#110","level":3,"time":"2014-07-02T14:35:45+06:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/ajax\/getstoragestats.php?dir=%2FWebDAV%2Ftest2"} {"reqId":"53b3c460cef37","app":"PHP","message":"Undefined index: personal at \/var\/www\/owncloud\/apps\/files_external\/lib\/config.php#110","level":3,"time":"2014-07-02T14:35:45+06:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/ajax\/getstoragestats.php?dir=%2FWebDAV%2Ftest2"} {"reqId":"53b3c397e139a","app":"core","message":"Exception during mimetype insertion: An exception occurred while executing 'INSERT INTO `oc_mimetypes`(`mimetype`) VALUES(?)':\n\nSQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction","level":0,"time":"2014-07-02T14:36:00+06:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/ajax\/scan.php?force=false&dir=&requesttoken=55099fa443bf4c21a129"} {"reqId":"53b3c39967a6a","app":"core","message":"Exception during mimetype insertion: An exception occurred while executing 'INSERT INTO `oc_mimetypes`(`mimetype`) VALUES(?)':\n\nSQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction","level":0,"time":"2014-07-02T14:36:02+06:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/ajax\/list.php?dir=%2Fdropbox_dav&sort=name&sortdirection=asc"} {"reqId":"53b3c397e139a","app":"core","message":"Exception while scanning file \"connections.xml\": An exception occurred while executing 'INSERT INTO `oc_filecache` (`mimepart`, `mimetype`, `mtime`, `size`, `etag`, `storage_mtime`, `permissions`, `path_hash`, `path`, `parent`, `name`, `storage`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)':\n\nSQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction","level":0,"time":"2014-07-02T14:36:34+06:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/ajax\/scan.php?force=false&dir=&requesttoken=55099fa443bf4c21a129"} {"reqId":"53b3c39967a6a","app":"core","message":"Exception while scanning file \"connections.xml\": An exception occurred while executing 'INSERT INTO `oc_filecache` (`mimepart`, `mimetype`, `mtime`, `size`, `etag`, `storage_mtime`, `permissions`, `path_hash`, `path`, `parent`, `name`, `storage`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)':\n\nSQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction","level":0,"time":"2014-07-02T14:36:34+06:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/ajax\/list.php?dir=%2Fdropbox_dav&sort=name&sortdirection=asc"} {"reqId":"53b3c397e139a","app":"core","message":"Exception during mimetype insertion: An exception occurred while executing 'INSERT INTO `oc_mimetypes`(`mimetype`) VALUES(?)':\n\nSQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'application\/vnd.android.package-archive' for key 'mimetype_id_index'","level":0,"time":"2014-07-02T14:37:24+06:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/ajax\/scan.php?force=false&dir=&requesttoken=55099fa443bf4c21a129"} {"reqId":"53b3c39967a6a","app":"core","message":"Exception during mimetype insertion: An exception occurred while executing 'INSERT INTO `oc_mimetypes`(`mimetype`) VALUES(?)':\n\nSQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'application\/vnd.android.package-archive' for key 'mimetype_id_index'","level":0,"time":"2014-07-02T14:37:24+06:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/ajax\/list.php?dir=%2Fdropbox_dav&sort=name&sortdirection=asc"} {"reqId":"53b3c39967a6a","app":"core","message":"Exception while scanning file \"DICE_Player_2_0_5_Crk.apk\": An exception occurred while executing 'INSERT INTO `oc_filecache` (`mimepart`, `mimetype`, `mtime`, `size`, `etag`, `storage_mtime`, `permissions`, `path_hash`, `path`, `parent`, `name`, `storage`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)':\n\nSQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '7-39390930ba881cbe34002f081efe95ae' for key 'fs_storage_path_hash'","level":0,"time":"2014-07-02T14:37:24+06:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/ajax\/list.php?dir=%2Fdropbox_dav&sort=name&sortdirection=asc"} {"reqId":"53b3c397e139a","app":"core","message":"Exception while scanning file \"DICE_Player_2_0_5_Crk.apk\": An exception occurred while executing 'INSERT INTO `oc_filecache` (`mimepart`, `mimetype`, `mtime`, `size`, `etag`, `storage_mtime`, `permissions`, `path_hash`, `path`, `parent`, `name`, `storage`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)':\n\nSQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '7-39390930ba881cbe34002f081efe95ae' for key 'fs_storage_path_hash'","level":0,"time":"2014-07-02T14:37:24+06:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/ajax\/scan.php?force=false&dir=&requesttoken=55099fa443bf4c21a129"} {"reqId":"53b3c39967a6a","app":"core","message":"Exception during mimetype insertion: An exception occurred while executing 'INSERT INTO `oc_mimetypes`(`mimetype`) VALUES(?)':\n\nSQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'application\/vnd.android.package-archive' for key 'mimetype_id_index'","level":0,"time":"2014-07-02T14:37:43+06:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/ajax\/list.php?dir=%2Fdropbox_dav&sort=name&sortdirection=asc"} {"reqId":"53b3c39967a6a","app":"core","message":"Exception while scanning file \"FDroid.apk\": An exception occurred while executing 'INSERT INTO `oc_filecache` (`mimepart`, `mimetype`, `mtime`, `size`, `etag`, `storage_mtime`, `permissions`, `path_hash`, `path`, `parent`, `name`, `storage`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)':\n\nSQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '7-82cbe4434ca1072d39a0042f1e0aca3d' for key 'fs_storage_path_hash'","level":0,"time":"2014-07-02T14:37:43+06:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/ajax\/list.php?dir=%2Fdropbox_dav&sort=name&sortdirection=asc"} {"reqId":"53b3c397e139a","app":"core","message":"Exception during mimetype insertion: An exception occurred while executing 'INSERT INTO `oc_mimetypes`(`mimetype`) VALUES(?)':\n\nSQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'application\/vnd.android.package-archive' for key 'mimetype_id_index'","level":0,"time":"2014-07-02T14:37:43+06:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/ajax\/scan.php?force=false&dir=&requesttoken=55099fa443bf4c21a129"} {"reqId":"53b3c397e139a","app":"core","message":"Exception while scanning file \"FDroid.apk\": An exception occurred while executing 'INSERT INTO `oc_filecache` (`mimepart`, `mimetype`, `mtime`, `size`, `etag`, `storage_mtime`, `permissions`, `path_hash`, `path`, `parent`, `name`, `storage`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)':\n\nSQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '7-82cbe4434ca1072d39a0042f1e0aca3d' for key 'fs_storage_path_hash'","level":0,"time":"2014-07-02T14:37:43+06:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/ajax\/scan.php?force=false&dir=&requesttoken=55099fa443bf4c21a129"} {"reqId":"53b3c39967a6a","app":"core","message":"Exception while scanning file \"Getting Started.pdf\": An exception occurred while executing 'INSERT INTO `oc_filecache` (`mimepart`, `mimetype`, `mtime`, `size`, `etag`, `storage_mtime`, `permissions`, `path_hash`, `path`, `parent`, `name`, `storage`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)':\n\nSQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '7-e0999a5a9940a46059219a7616fa2d95' for key 'fs_storage_path_hash'","level":0,"time":"2014-07-02T14:38:01+06:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/ajax\/list.php?dir=%2Fdropbox_dav&sort=name&sortdirection=asc"} {"reqId":"53b3c397e139a","app":"core","message":"Exception while scanning file \"Getting Started.pdf\": An exception occurred while executing 'INSERT INTO `oc_filecache` (`mimepart`, `mimetype`, `mtime`, `size`, `etag`, `storage_mtime`, `permissions`, `path_hash`, `path`, `parent`, `name`, `storage`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)':\n\nSQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '7-e0999a5a9940a46059219a7616fa2d95' for key 'fs_storage_path_hash'","level":0,"time":"2014-07-02T14:38:01+06:00","method":"GET","url":"\/owncloud\/index.php\/apps\/files\/ajax\/scan.php?force=false&dir=&requesttoken=55099fa443bf4c21a129"} {"reqId":"53b3c4f3cae96","app":"PHP","message":"Undefined index: personal at \/var\/www\/owncloud\/apps\/files_external\/lib\/config.php#110","level":3,"time":"2014-07-02T14:38:11+06:00","method":"POST","url":"\/owncloud\/index.php\/heartbeat"} ```
@PVince81
Copy link
Contributor

PVince81 commented Jul 2, 2014

There are some suspicious errors in your log, integrity violation when adding mimetype. Very strange.
Not sure if they contribute to the slow down though.

Note that there is an initial scanning time: it will first traverse all dirs on the remote webdav folder to index the files. Once this is done, it should be faster. But in your case it seems to show a blank page.
Maybe the scanning took too long and the PHP process ran into a timeout ?

CC @icewind1991

@MarvinFS
Copy link
Author

MarvinFS commented Jul 2, 2014

Yes blank page for existing files on yandex cloud and takes ages to complete on dropbox.
and there are not so many of them as i already said... nothing to index actually... anyway after the initial agelong scan time when it finally shows, changing folders is not faster at all... the same agelong waiting... I don't know how to troubleshoot... but as far as i've tried it on 2 separate clean VMs with different linux version i presume it's a OC issue... anyway again windows is working lighting fast with these clouds by the same webdav...

@guruz
Copy link
Contributor

guruz commented Nov 21, 2014

When we last checked, the WebDAV external storage did not cache its credentials, so it re-authenticated for each request to the external storage.

@dragotin might remember which issue that was.

EDIT: Found it #12228

@LukasReschke
Copy link
Member

Tracked at #12228 - the PR from @dragotin is another one but we couldn't use it as it breaks other things.

@LukasReschke
Copy link
Member

That said: The cookie authentication should only be relevant for S2S sharing.

@PVince81
Copy link
Contributor

Closing in favor of #13882.

Please note that in OC 8.1.1 a stat cache has been added which should reduce the time needed for scanning and some file operations.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants