core icon indicating copy to clipboard operation
core copied to clipboard

OC hangs with MySQL

Open treynolen opened this issue 13 years ago • 9 comments

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.

treynolen avatar Dec 15 '12 02:12 treynolen

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.

treynolen avatar Dec 15 '12 02:12 treynolen

How do you reproduce this error?

msrex avatar Dec 16 '12 03:12 msrex

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.

treynolen avatar Dec 16 '12 13:12 treynolen

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.

MATize avatar Dec 19 '12 10:12 MATize

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?

treynolen avatar Dec 19 '12 18:12 treynolen

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/

MATize avatar Dec 20 '12 13:12 MATize

This comes from an attempt to fix syncing of the Shared folder, these queries won't be happening with the new file cache.

MTGap avatar Jan 19 '13 04:01 MTGap

This should be fixed with OC5, please reopen if it is not solved.

bartv2 avatar Apr 19 '13 11:04 bartv2

I see similar behaviour with owncoud 4.5.12, is this fixed in 4.5.x branch?

gufete avatar Jun 28 '13 10:06 gufete