I have migrated a dockerized NextCloud installation to a new server but I am receiving error messages “Internal server error”:
Nextcloud version: 25.0.3
Operating system and version: Ubuntu 22.04
I have checked the output of Nextcloud log in Admin > Logging:
There are many similar messages like
{"reqId":"ti9gnxkELGw1NBGbjOkZ","level":3,"time":"2023-02-12T19:30:38+00:00","remoteAddr":"145.40.196.129","user":"wlojak","app":"webdav","method":"PROPFIND","url":"/remote.php/dav/files/wlojak/SONAR-Shared","message":"OC\\DB\\Exceptions\\DbalException: An exception occurred while executing a query: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction","userAgent":"Mozilla/5.0 (Macintosh) mirall/2.6.5stable (build 20200710) (Nextcloud)","version":"25.0.2.3","exception":{"Exception":"Sabre\\DAV\\Exception\\ServiceUnavailable","Message":"OC\\DB\\Exceptions\\DbalException: An exception occurred while executing a query: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction","Code":0,"Trace":[{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php","line":180,"function":"check","class":"OCA\\DAV\\Connector\\Sabre\\Auth","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php","line":135,"function":"check","class":"Sabre\\DAV\\Auth\\Plugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"beforeMethod","class":"Sabre\\DAV\\Auth\\Plugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":456,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["beforeMethod:PROPFIND",[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/lib/Server.php","line":360,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":171,"args":["/var/www/html/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/html/apps/dav/lib/Connector/Sabre/Auth.php","Line":143,"message":"OC\\DB\\Exceptions\\DbalException: An exception occurred while executing a query: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction","exception":[],"CustomMessage":"OC\\DB\\Exceptions\\DbalException: An exception occurred while executing a query: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction"},"id":"63f636400e18d"}
or
{"reqId":"6btMVJ6IdPDqzBhg6rFH","level":3,"time":"2023-02-12T20:19:34+00:00","remoteAddr":"78.43.252.143","user":"xian","app":"no app in context","method":"PUT","url":"/remote.php/dav/files/xian/Instructions/Isomorph/LDAP/Apache%20Directory%20Studio.md","message":"\"Instructions/Isomorph/LDAP/Apache Directory Studio.md\" is locked","userAgent":"Mozilla/5.0 (Macintosh) mirall/3.3.4git (build 7471) (Nextcloud, osx-20.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"25.0.2.3","exception":{"Exception":"OCA\\DAV\\Connector\\Sabre\\Exception\\FileLocked","Message":"\"Instructions/Isomorph/LDAP/Apache Directory Studio.md\" is locked","Code":0,"Trace":[{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":1137,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":492,"function":"updateFile","class":"Sabre\\DAV\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:PUT",[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/lib/Server.php","line":360,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":171,"args":["/var/www/html/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/html/apps/dav/lib/Connector/Sabre/File.php","Line":204,"Previous":{"Exception":"OCP\\Lock\\LockedException","Message":"\"Instructions/Isomorph/LDAP/Apache Directory Studio.md\" is locked","Code":0,"Trace":[{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/Node.php","line":412,"function":"changeLock","class":"OC\\Files\\View","type":"->","args":["/Instructions/Isomorph/LDAP/Apache Directory Studio.md",2]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/File.php","line":191,"function":"changeLock","class":"OCA\\DAV\\Connector\\Sabre\\Node","type":"->","args":[2]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":1137,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":492,"function":"updateFile","class":"Sabre\\DAV\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:PUT",[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/lib/Server.php","line":360,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":171,"args":["/var/www/html/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/Files/View.php","Line":2012,"Previous":{"Exception":"OCP\\Lock\\LockedException","Message":"\"files/3f54e165faeca547fc51b158e3f875a7\" is locked","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Files/Storage/Common.php","line":827,"function":"changeLock","class":"OC\\Lock\\DBLockingProvider","type":"->","args":["files/3f54e165faeca547fc51b158e3f875a7",2]},{"file":"/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":632,"function":"changeLock","class":"OC\\Files\\Storage\\Common","type":"->","args":["files/Notebooks/Instructions/Isomorph/LDAP/Apache Directory Studio.md",2,{"__class__":"OC\\Lock\\DBLockingProvider"}]},{"file":"/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":632,"function":"changeLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["files/Notebooks/Instructions/Isomorph/LDAP/Apache Directory Studio.md",2,{"__class__":"OC\\Lock\\DBLockingProvider"}]},{"file":"/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":632,"function":"changeLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["files/Notebooks/Instructions/Isomorph/LDAP/Apache Directory Studio.md",2,{"__class__":"OC\\Lock\\DBLockingProvider"}]},{"file":"/var/www/html/apps/files_sharing/lib/SharedStorage.php","line":507,"function":"changeLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["files/Notebooks/Instructions/Isomorph/LDAP/Apache Directory Studio.md",2,{"__class__":"OC\\Lock\\DBLockingProvider"}]},{"file":"/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php","line":632,"function":"changeLock","class":"OCA\\Files_Sharing\\SharedStorage","type":"->","args":["Isomorph/LDAP/Apache Directory Studio.md",2,{"__class__":"OC\\Lock\\DBLockingProvider"}]},{"file":"/var/www/html/lib/private/Files/View.php","line":2006,"function":"changeLock","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->","args":["Isomorph/LDAP/Apache Directory Studio.md",2,{"__class__":"OC\\Lock\\DBLockingProvider"}]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/Node.php","line":412,"function":"changeLock","class":"OC\\Files\\View","type":"->","args":["/Instructions/Isomorph/LDAP/Apache Directory Studio.md",2]},{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/File.php","line":191,"function":"changeLock","class":"OCA\\DAV\\Connector\\Sabre\\Node","type":"->","args":[2]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":1137,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":492,"function":"updateFile","class":"Sabre\\DAV\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:PUT",[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/lib/Server.php","line":360,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":171,"args":["/var/www/html/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/Lock/DBLockingProvider.php","Line":220}},"message":"\"Instructions/Isomorph/LDAP/Apache Directory Studio.md\" is locked","exception":[],"CustomMessage":"\"Instructions/Isomorph/LDAP/Apache Directory Studio.md\" is locked"},"id":"63f636400e13e"}
I am able to login to NextCloud but I cannot synchronize by using the NextCloud sync client: when authenticating I receive the following message:
Internal Server Error
The server was unable to complete your request.
If this happens again, please send the technical details below to the server administrator.
More details can be found in the server log.
### Technical details
* Remote Address: 172.20.0.3
* Request ID: WgTzMmMdXhwJ7TQCT24y
How can I resolve the problem?