Sync very slow / stall / freeze

Hi guys,

I have migrated my server without any problem and I am happy to join this community!

I have been using ownCloud for a long time without problems. With version 8 I started noticing sync issues. I was hoping that they would get resolved when I upgraded to version 9 and to Nextcloud but they are still there.

Configuration
Hosted server
Linux
Apache 2.2.x
PHP 5.6.17
MySQL 5.5

ownCloud clients 2.1.1 running Windows 10, Linux Mint (Ubuntu) and Arch Linux

Symptoms
Synchronization of folders and/or files slows down extremely during progress. Often the sync stops for a few minutes then resumes. Sometimes the sync stalls with a red time-out message in the client interface. Eventually sync will resume and finish without error after a number of retries and long waits. Sometimes sync takes place without a glitch.

Every time sync stalls I notice the same group of 3 messages in the log (older message at the bottom):

[code]Fatal webdav Exception: {“Message”:“HTTP/1.1 503 Could not open file”,“Exception”:“Sabre\DAV\Exception\ServiceUnavailable”,“Code”:0,“Trace”:"#0 /home/clients/77b4be0c67b1b0092230ddb1aab5268c/users/owncloud/web/3rdparty/sabre/dav/lib/DAV/CorePlugin.php(83): OCA\DAV\Connector\Sabre\File->get()\n#1 [internal function]: Sabre\DAV\CorePlugin->httpGet(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#2 /home/clients/77b4be0c67b1b0092230ddb1aab5268c/users/owncloud/web/3rdparty/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#3 /home/clients/77b4be0c67b1b0092230ddb1aab5268c/users/owncloud/web/3rdparty/sabre/dav/lib/DAV/Server.php(459): Sabre\Event\EventEmitter->emit(‘method:GET’, Array)\n#4 /home/clients/77b4be0c67b1b0092230ddb1aab5268c/users/owncloud/web/3rdparty/sabre/dav/lib/DAV/Server.php(248): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#5 /home/clients/77b4be0c67b1b0092230ddb1aab5268c/users/owncloud/web/apps/dav/appinfo/v1/webdav.php(55): Sabre\DAV\Server->exec()\n#6 /home/clients/77b4be0c67b1b0092230ddb1aab5268c/users/owncloud/web/remote.php(138): require_once(’/home/clients/7…’)\n#7 {main}",“File”:"/home/clients/77b4be0c67b1b0092230ddb1aab5268c/users/owncloud/web/apps/dav/lib/connector/sabre/file.php",“Line”:306,“User”:“jeancf”} 2016-03-19T07:26:27+00:00

Error PHP fclose() expects parameter 1 to be resource, boolean given at /home/clients/77b4be0c67b1b0092230ddb1aab5268c/users/owncloud/web/lib/private/files/storage/wrapper/encryption.php#813 2016-03-19T07:26:27+00:00

Error PHP fread() expects parameter 1 to be resource, boolean given at /home/clients/77b4be0c67b1b0092230ddb1aab5268c/users/owncloud/web/lib/private/files/storage/wrapper/encryption.php#812 2016-03-19T07:26:27+00:00
[/code]

I am not using encryption so I find these messages strange.

Sync has become and erratic, unpredictable and very long exercise. Please help. Thanks.

1 Like

Does anybody have an idea where to look for a solution?

Here’s what the web server log file looks like when sync fails:

[Sun Jun 26 10:18:04 2016] [error] [client 81.242.128.112] ModSecurity: Error reading request body: Partial results are valid but processing is incomplete [hostname "www.example.com"] [uri "/~owncloud/remote.php/webdav/QuiteRSS/feeds.db-chunking-2175015828-2-0"] [unique_id "V2@PvIBBwyIAANaVtlUAAAAR"]
[Sun Jun 26 10:18:23 2016] [error] [client 81.242.128.112] ModSecurity: Error reading request body: Partial results are valid but processing is incomplete [hostname "www.example.com"] [uri "/~owncloud/remote.php/webdav/QuiteRSS/feeds.db-chunking-2175015828-2-0"] [unique_id "V2@PvIBBwyIAANBEpq0AAAAg"]
[Sun Jun 26 10:32:34 2016] [crit] [client 81.242.128.112] (13)Permission denied: /home/clients/77b4be0c67b1b0092230ddb1aab5268c/web/~owncloud/data/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
[Sun Jun 26 10:38:13 2016] [error] [client 81.242.128.112] ModSecurity: Error reading request body: Partial results are valid but processing is incomplete [hostname "www.example.com"] [uri "/~owncloud/remote.php/webdav/Unreal Projects/Proof_of_Concept/Intermediate/CachedAssetRegistry.bin"] [unique_id "V2@TA4BBwyIAAK04Qp0AAAAR"]
[Sun Jun 26 10:44:34 2016] [error] [client 81.242.128.112] FastCGI: server "/home/clients/77b4be0c67b1b0092230ddb1aab5268c/.config/apache/example.com/.fpm/php5.external" stderr: PHP message: PHP Deprecated:  Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0
[Sun Jun 26 10:48:00 2016] [error] [client 81.242.128.112] ModSecurity: Error reading request body: Partial results are valid but processing is incomplete [hostname "www.example.com"] [uri "/~owncloud/remote.php/webdav/Unreal Projects/Proof_of_Concept/Intermediate/CachedAssetRegistry.bin"] [unique_id "V2@Vv4BBwyIAAPvIuJEAAAAO"]


Can you disable mod_security for now? We don’t support this officially and it very likely will cause some problems.

Thanks. Unfortunately mod_security is enabled by default by the service provider hosting my web site and cannot be disabled.

I do have a similar Problem with Nextcloud 10. Before I had an owncloud 8 installation which performed good at the same machine…
In both cases the environment was: Linux, Apache HTTP Server 2.2, PHP 5.6.23, mariaDB 5.5.50, similar to the one listed above.

During “Search for changes” CPU is at 98%, RAM 50% during normal operation 0% to 5%, according to network traffic <10 kB/s …

The sync volume is 3 GB but just the “search for changes” takes hours… while the sync with owncloud 8 was complete in less than 1 h (same hardware/software environment!)

Additional Info: measured 9-22-16 transfer rate 10 MB / minute! Connected via 1000 Mbit LAN (no Internet connection between Client and Server)

1 Like

Same for me:

Fatal	webdav	Exception: {"Message":"HTTP\/1.1 503 Could not open file","Exception":"Sabre\\DAV\\Exception\\ServiceUnavailable","Code":0,"Trace":"#0 \/share3\/www\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php(83): OCA\\DAV\\Connector\\Sabre\\File->get()\n#1 [internal function]: Sabre\\DAV\\CorePlugin->httpGet(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#2 \/share3\/www\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#3 \/share3\/www\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(459): Sabre\\Event\\EventEmitter->emit('method:GET', Array)\n#4 \/share3\/www\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(248): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#5 \/share3\/www\/apps\/dav\/appinfo\/v1\/webdav.php(60): Sabre\\DAV\\Server->exec()\n#6 \/share3\/www\/remote.php(165): require_once('\/share3\/www\/app...')\n#7 {main}","File":"\/share3\/www\/apps\/dav\/lib\/Connector\/Sabre\/File.php","Line":307,"User":"UserXXX"}	2016-10-05T19:02:05+00:00	UserXXX
Error	PHP	fopen(/share3/www/data/UserXXX/files/6c82572a6abe33ed5e8ed4394529cb5a.jpg): failed to open stream: No such file or directory at /share3/www/lib/private/Files/Storage/Local.php#274	2016-10-05T19:02:05+00:00	UserXXX

Raspberry Pi 3
Nextcloud 10.0 (stable)
Raspbian 4.4.17-v7+ #904 SMP Tue Aug 16 17:02:00 BST 2016 armv7l GNU/Linux
nginx version: nginx/1.6.2
PHP 5.6.24-0+deb8u1
Zend Engine v2.6.0
MySQL Server version 5.5.52-0+deb8u1

If mod_security is the cause of this problem, you can only turn it off or modify the rules. If it is on a shared hosting and the provider does not cooperate, there is very little you can do.

On your own environments, especially if things break between upgrades, this is really interesting. But for @Bert, do you use mod_security? If it is your own server and you don’t use mod_security, please open a new issue.

I had Owncloud installed and it worked good. a week ago sync became so slow that it took hours to sync one File! I could not detect any proplematic entries on the server (Debian Jessie, Apache2, Mysql). So i switched to nextcloud thinking of the problem should be solved. But again , no sync possible at accceptable speed. Even my LAN gets extreme slow while the Desktop-Client tries to sync anything. I can not help myself any longer. Whats about mod_Secure … did any change work? What did thee others , what was the solution?

I have now recognized that it has something to do with Wordpress Installations …
If i dissite the overlaying domain (conf) and restart Server, everything goes faster now!
Anyone an IDEA? Where to look at?

Excuse me… what does it mean… if I dissite the overlaying domain (conf) ?
Please