-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
MySQL 1213 Deadlock when creating a lot of directories in parallel #18918
Comments
@icewind1991 idea idea? is this expected? |
happens also with the desktop sync client when copying folders with a lot of small files within a synced folder
I run into that problem when doing my performance tests for PR #18753 |
I'm trying to understand how the file locking is supposed to work. |
That Exception is thrown in dblockingprovider.php https://github.com/owncloud/core/blob/master/lib/private/lock/dblockingprovider.php#L87 so either we have to do without the transaction (why do we actually need?) it or we have to catch the Exception. E.g. a LockedException could be thrown, so the file where the lock could not be updated would be also regarded as locked.
|
That seems like the best approach (we need the transaction to prevent some race conditions) |
Could the race conditions not happen also in changeLog() or releaseLog() ? If so we would need to have transactions there too and finally shouldn't there be consequently also a roll back? |
No, acquireLock needs one since it does 2 db operations, making sure the entry exists and setting the lock |
So would #19098 fix this ? |
Yes with the disadvantages discussed there. Could close this as soon as its decided how exactly the lock will be implemented and the PR merged |
Steps to reproduce
Expected behaviour
directories are created and "HTTP 201" code is returned on every request
Actual behaviour
After a while some requests get "HTTP 500" error returned
Server configuration
Operating system:
Linux deepthought2 4.0.0-2-amd64 #1 SMP Debian 4.0.4-1tanglu2 (2015-05-31) x86_64 GNU/Linux
Web server:
Apache/2.4.10
Database:
MySQL 5.5.44-0
PHP version:
PHP Version 5.6.12-0+deb8u1~tanglu3.1
ownCloud version: (see ownCloud admin page)
ownCloud 8.2 pre alpha (git)
Updated from an older ownCloud or fresh install:
updated
List of acti40.0.3vated apps:
The content of config/config.php:
Are you using external storage, if yes which one: local/smb/sftp/...
no
Are you using encryption: yes/no
no
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
no
Client configuration
Browser:
Firefox 40.0.3
Operating system:
Linux deepthought2 4.0.0-2-amd64 #1 SMP Debian 4.0.4-1tanglu2 (2015-05-31) x86_64 GNU/Linux
Logs
Wireshark dump
https://inf.blaucloud.de/index.php/s/GJkE0VDy8hHvq8n
password: wireshark
Web server error log
ownCloud log (data/owncloud.log)
pyocclient output
The text was updated successfully, but these errors were encountered: