{"action":"created","issue":{"url":"https://api.github.com/repos/owncloud/core/issues/15726","labels_url":"https://api.github.com/repos/owncloud/core/issues/15726/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/core/issues/15726/comments","events_url":"https://api.github.com/repos/owncloud/core/issues/15726/events","html_url":"https://github.com/owncloud/core/issues/15726","id":69311326,"number":15726,"title":"Exception occurred while executing 'INSERT INTO `oc_filecache` ","user":{"login":"mmattel","id":3321281,"avatar_url":"https://avatars.githubusercontent.com/u/3321281?v=3","gravatar_id":"","url":"https://api.github.com/users/mmattel","html_url":"https://github.com/mmattel","followers_url":"https://api.github.com/users/mmattel/followers","following_url":"https://api.github.com/users/mmattel/following{/other_user}","gists_url":"https://api.github.com/users/mmattel/gists{/gist_id}","starred_url":"https://api.github.com/users/mmattel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmattel/subscriptions","organizations_url":"https://api.github.com/users/mmattel/orgs","repos_url":"https://api.github.com/users/mmattel/repos","events_url":"https://api.github.com/users/mmattel/events{/privacy}","received_events_url":"https://api.github.com/users/mmattel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-18T13:52:51Z","updated_at":"2015-04-19T09:11:49Z","closed_at":null,"body":"Ubuntu 14.04, MySQL 5.5.41, PHP  5.5.9-1, nginx 1.7.12, owncloud from master 8.1 alpha 1 (git), \r\ncreated via: sudo ocdev setup base --dir /xxxxxxxx\r\nonly enabled app: files_external, no encryption\r\n\r\nAfter enabeling files external, I added a smb share, switched to files, waited for a minute and got 19k files scanned and imported to the database. Everything is fine.\r\n\r\nAfter adding a second smb share, switching to files, owncloud becomes more or less unresponsive (trying to switch to the admin page again). You can see that the scanner is working.\r\ntail -f owncloud.log reports continiously but very slow debug logs entries of the same kind. \r\n\r\nhtop shows no load on the system.\r\nI have tested this a couple of times, but always at the second smb mount, the behaviour is the same.\r\nI have also mixed up the sort order of the smb mounts to see if this could be the problem, but it isn´t\r\n\r\nowncloud.log\r\n```javascript\r\nDebug\tcore\t\r\nException while scanning file \"xxxxxx\": An exception occurred while executing 'INSERT INTO `oc_filecache` (`mimepart`,`mimetype`,`mtime`,`size`,`etag`,`storage_mtime`,`permissions`,`path_hash`,`path`,`parent`,`name`,`storage`) SELECT ?,?,?,?,?,?,?,?,?,?,?,? FROM `oc_filecache` WHERE `storage` = ? AND `path_hash` = ? HAVING COUNT(*) = 0' with params [\"1\", \"2\", 1394732126, -1, \"55325186cf826\", 1394732126, 31, \"149dcdcf3e02706bb0d934f74f1b279c\", \"Reisep\\u00e4sse\", \"69068\", \"Reisep\\u00e4sse\", \"9\", \"9\", \"149dcdcf3e02706bb0d934f74f1b279c\"]: SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction\r\n```\r\nnginx error log (same entry every ~12 minutes)\r\n```javascript\r\n2015/04/18 15:47:14 [error] 3830#0: *17 upstream timed out (110: Connection timed out) while reading upstream, client: xx.xx.xx.xx, server: yyyy, request: \"GET /index.php/apps/files/ajax/scan.php?force=false&dir=&requesttoken=zzzz HTTP/1.1\", upstream: \"fastcgi://127.0.0.1:9000\", host: \"yyyy\", referrer: \"yyyy/index.php/apps/files\"\r\n```\r\n\r\nHere is an output of mysql\r\n\r\n```javascript\r\nmysql> show open tables where in_use>0;\r\n+----------+--------------+--------+-------------+\r\n| Database | Table        | In_use | Name_locked |\r\n+----------+--------------+--------+-------------+\r\n| xxxx     | oc_filecache |      4 |           0 |\r\n+----------+--------------+--------+-------------+\r\n1 row in set (0.00 sec)\r\n\r\nmysql> show processlist;\r\n+-----+------+-----------+------+---------+------+-----------+------------------------------------------------------------------------------------------------------+\r\n| Id  | User | Host      | db   | Command | Time | State     | Info                                                                                                 |\r\n+-----+------+-----------+------+---------+------+-----------+------------------------------------------------------------------------------------------------------+\r\n| 194 | yyyy | localhost | xxxx | Sleep   | 1675 |           | NULL                                                                                                 |\r\n| 208 | yyyy | localhost | xxxx | Query   |   26 | executing | INSERT INTO `oc_filecache` (`mimepart`,`mimetype`,`mtime`,`size`,`etag`,`storage_mtime`,`permissions |\r\n| 212 | yyyy | localhost | xxxx | Query   |   26 | executing | INSERT INTO `oc_filecache` (`mimepart`,`mimetype`,`mtime`,`size`,`etag`,`storage_mtime`,`permissions |\r\n| 213 | zzzz | localhost | NULL | Query   |    0 | NULL      | show processlist                                                                                     |\r\n+-----+------+-----------+------+---------+------+-----------+------------------------------------------------------------------------------------------------------+\r\n4 rows in set (0.00 sec)\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/owncloud/core/issues/comments/94254658","html_url":"https://github.com/owncloud/core/issues/15726#issuecomment-94254658","issue_url":"https://api.github.com/repos/owncloud/core/issues/15726","id":94254658,"user":{"login":"mmattel","id":3321281,"avatar_url":"https://avatars.githubusercontent.com/u/3321281?v=3","gravatar_id":"","url":"https://api.github.com/users/mmattel","html_url":"https://github.com/mmattel","followers_url":"https://api.github.com/users/mmattel/followers","following_url":"https://api.github.com/users/mmattel/following{/other_user}","gists_url":"https://api.github.com/users/mmattel/gists{/gist_id}","starred_url":"https://api.github.com/users/mmattel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmattel/subscriptions","organizations_url":"https://api.github.com/users/mmattel/orgs","repos_url":"https://api.github.com/users/mmattel/repos","events_url":"https://api.github.com/users/mmattel/events{/privacy}","received_events_url":"https://api.github.com/users/mmattel/received_events","type":"User","site_admin":false},"created_at":"2015-04-19T09:11:49Z","updated_at":"2015-04-19T09:11:49Z","body":"### Steps to reproduce\r\nCreate a SMB share, change to the files app, scanning will quickly finish.\r\nCreate another SMB share, change to the files app, scanning will take forever and error logs are produced.\r\nSee description at the top\r\n\r\n### Expected behaviour\r\nQuick and error free scanning\r\n\r\n### Actual behaviour\r\nScanning does not finish and produces owncloud errors\r\n\r\n### Server configuration\r\n**Operating system**:\r\nUbuntu 14.04\r\n\r\n**Web server:**\r\n nginx 1.7.12\r\n\r\n**Database:**\r\nMySQL 5.5.41\r\n\r\n**PHP version:**\r\nPHP 5.5.9-1\r\n\r\n**ownCloud version:** (see ownCloud admin page)\r\nowncloud from master 8.1 alpha 1 (git), created via: sudo ocdev setup base --dir /xxxxxxxx\r\n\r\n**Updated from an older ownCloud or fresh install:**\r\nNo\r\n\r\n**List of activated apps:**\r\nfiles_external\r\n\r\n**The content of config/config.php:**\r\n\r\n```\r\n<?php\r\n$CONFIG = array (\r\n  'instanceid' => 'xxxx',\r\n  'passwordsalt' => 'xxxx',\r\n  'secret' => 'xxxx',\r\n  'trusted_domains' =>\r\n   array (\r\n    0 => 'xxxx',\r\n   ),\r\n  'datadirectory' => '/var/www/xxxx/data',\r\n  'overwrite.cli.url' => 'xxxx',\r\n  'dbtype' => 'mysql',\r\n  'version' => '8.1.0.2',\r\n  'dbname' => 'xxxx',\r\n  'dbhost' => 'localhost',\r\n  'dbtableprefix' => 'oc_',\r\n  'dbuser' => 'oc_xxxx',\r\n  'dbpassword' => 'xxxx',\r\n  'logtimezone' => 'Europe/Vienna',\r\n  'installed' => true,\r\n  'memcache.local' => '\\\\OC\\\\Memcache\\\\APCu',\r\n  'excluded_directories' =>\r\n   array (\r\n    0 => '.snapshot',\r\n    1 => '~snapshot',\r\n   ),\r\n  'loglevel' => 0,\r\n);\r\n\r\n```\r\n\r\n**Are you using external storage, if yes which one:** local/smb/sftp/...\r\nSMB\r\n\r\n**Are you using encryption:** yes/no\r\nNo\r\n\r\n**Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/...\r\nNo\r\n\r\n### Client configuration\r\n**Browser:**\r\nOpera\r\n\r\n**Operating system:**\r\nW7\r\n\r\n### Logs\r\n\r\n#### ownCloud log (data/owncloud.log)\r\n\r\nsee at the top\r\n\r\n\r\n"}}