OC hangs with MySQL
Under heavy use, OC hangs and MySQL runs 100% processor with queries like these:
Query DELETE FROM `oc_properties` WHERE `propertypath` = '/Shared'
Query DELETE FROM `oc_properties` WHERE `userid` = '<user>' AND `propertyname` = '{DAV:}getetag' AND `propertypath` IN ('<path>')
OC 4.5.4 on Ubuntu 12.04.1 LTS
Clients cannot log in. Hangs indefinitely.
Additional information: The queries above seem to loop over and over indefinitely. Restarting mysql does NOT fix the issue. The user that cannot log in is the user receiving shared files. Once the sharing user logs in and unshares the files, the queries stop. Then, the files can be reshared and the receiving user can log in. Everything works for a while. I'm not sure what is triggering the loop, but will be glad to help debug it.
How do you reproduce this error?
I'm not sure. That is the problem. This cloud instance is getting heavy usage but most users are using one login. Most of the work is done through webdav. This instance has about 40,000 files on it. As I mentioned, I'm not sure what is triggering the issue, but it seems to happen when the cloud is under heavy load.
do you have any entries in owncloud.log or apache error log? I had a simular issue, mysql at 100%, but with only one user with a massive number of files and alot of umlaute and special characters in the filenames. Using the changes for lib/filecache.php from https://github.com/owncloud/core/pull/710/files fixed it for me furthermore i had to repair/restore the oc_fscache table.
I also have one user with a massive number of files, but I don't think they are using any special characters except maybe "-". I will try the filecache.php change, but how did you repair/restore the oc_fscache table?
I did use that command: myisamchk -r -q oc_fscache.MYI But you have to navigate first to the directory containing the *.MYI files. On my debian system they are located at /var/lib/mysql/owncloud/
This comes from an attempt to fix syncing of the Shared folder, these queries won't be happening with the new file cache.
This should be fixed with OC5, please reopen if it is not solved.
I see similar behaviour with owncoud 4.5.12, is this fixed in 4.5.x branch?