Forum

OwnCloud and random(?) errors

Jan-Philipp Schulze
3 January 2015, 22:18
First of all, thank you so much for this amazing piece of software! Hiawatha really is the most worry-free and easy-to-handle webserver that I've ever experience… wouldn't there be owncloud.

Actually, it works quite alright using this configuration:
...
# OwnCloud
VirtualHost {
Hostname = [...]
WebsiteRoot = /srv/www/htdocs/owncloud
StartFile = index.php
UseFastCGI = PHP5
TimeForCGI = 1000
WebDAVapp = yes
FollowSymlinks = yes
AllowDotFiles = yes
EnablePathInfo = yes
RequireSSL = yes
}
...


Small up-&downloads work like a charm, syncing contacts&calendars is also fine.
However, there are some quirks regarding time-demanding downloads. When browsing through e.g. a picture library sometimes the whole virtual host freezes, sometimes Hiawatha doesn't accept any requests anymore and there are also some occasions the ssl-connection stops working. And there are the times where everything works as expected and even large downloads (~100mb) finish. Restarting Hiawatha solves the problems temporarily.
The system.log e.g. says:
...
212.25.30.245|Sat 03 Jan 2015 20:35:11 +0100|Timeout while waiting for first request
212.25.30.245|Sat 03 Jan 2015 20:35:14 +0100|No cypher overlap during SSL handshake.
...


Is there any way to trace the problems down? In the moment they look so random…

When using Hiawatha as reverse proxy for nginx, owncloud runs fine but there are gateway timeouts (504) after just roughly 5 seconds of computing - also large downloads don't finish. Is there any way to adjust this threshold? Neither TimeForRequest, nor TimeForCGI do any good. Using nginx directly doesn't lead to any errors.

Sorry for all the owncloud-related trouble. Should I just quit using owncloud?


Hiawatha version: 9.9
Operating System: openSuSE 13.2
Hugo Leisink
4 January 2015, 13:01
I just tested it with MaxRequestSize set to 102400. I also set PHP's post_max_size and upload_max_filesize to 100M. This worked perfectly for me. Was able to upload a PDF of 50MB. Does it work for you when you don't use HTTPS?
Jan-Philipp Schulze
4 January 2015, 22:27
You might be onto something! I've just tried to download the files using a http connection which finished without errors. The secured download, however, failed after a few minutes leaving this in the system.log :
129.132.211.70|Sun 04 Jan 2015 22:04:24 +0100|Timeout while waiting for first request
129.132.211.70|Sun 04 Jan 2015 22:04:24 +0100|Timeout while waiting for first request
129.132.211.70|Sun 04 Jan 2015 22:04:24 +0100|Timeout while waiting for first request
129.132.211.70|Sun 04 Jan 2015 22:04:24 +0100|Timeout while waiting for first request


The problem is not the size of the download but the duration - at home where the transfer rate is at its maximum, the download succeeds after a few seconds either way.
What confuses me is that the error does not appear each time - I was told some could finish the download after restarting Hiawatha. I surely need to test this case on http connections more often - is there anything I can do to help solving the case? Should I swap the SSL certificate?
Hugo Leisink
6 January 2015, 09:52
So, not only the uploading but also the downloading of large files go wrong? Strange... Is it only files 'generated' by PHP or also static files directly from disk?
Jan-Philipp Schulze
6 January 2015, 20:30
Oh dear, just downloaded the file again (at home ~3MB/s, http) and Hiawatha broke down in the middle of it. I mean Hiawatha is still running fine as process but no connections come through on any vhost, using https or http. Again system.log says:
212.25.30.245|Tue 06 Jan 2015 19:26:35 +0100|Silent client disconnected

By the way, there are no errors in the php-fpm.log .

After restarting Hiawatha the download completed. Directly downloading the archive hasn't produced any errors (tested once for http and https connections). So it's a WebDAV related issue?
Just to mention: Thank you for all the time you invest in Hiawatha&Co!
Hugo Leisink
6 January 2015, 21:18
They only comparable issues I have with PHP is when I do some testing and exceed PHP's execution time. The only way to fix it then is to restart PHP. Please try to restart PHP instead of Hiawatha and tell me if that also solves the issue. During my own testing with ownCloud I have not been able to reproduce your issue, so I have totally no idea what goes wrong.
Gour
11 January 2015, 08:52
Hello,

Small up-&downloads work like a charm, syncing contacts&calendars is also fine.


At the moment I use Hiawatha/ownCloud on my own desktop (openSUSE) machin, but have problems with DavDroid client due to SSL certs, so considering to move ownCloud to my Linode VPS, but wonder how much memory should I expect to give it to OC? (two users only, each with few hundreds contacts and uploading multimedia stuff from their smart phones)...of course, Linode machine uses Hiawatha as well.


Gour
13 January 2015, 10:28
During my own testing with ownCloud I have not been able to reproduce your issue, so I have totally no idea what goes wrong.


Let me say that after moving my OC installation to the VPS I'm also experiencing:

94.250.187.124|Tue 13 Jan 2015 10:16:30 +0100|Timeout while waiting for first request


Tried to tweak some PHP settings and will report back how it goes...
Gour
13 January 2015, 10:34
Forgot to add that when I try to access my OC from Android phone, the access (via http) was not allowed and I found the following in my log:

212.15.176.211|Tue 13 Jan 2015 09:38:03 +0100|/some/path/.../wwwroot/remote.php|send timeout


and attempt to change some contact records from my GNOME desktop fails with:

94.250.187.124|Tue 13 Jan 2015 10:29:44 +0100|/var/www/owncloud/wwwroot/remote.php|CGI returned 500 Internal Error


Any hint is welcome!

Gour
13 January 2015, 11:54
500 Interrnal Error was due to database misconfiguration from my side.
Jan-Philipp Schulze
14 January 2015, 15:21
Sorry for the late reply, exam time takes its toll...
Restarting php doesn't improve the situation - Hiawatha still does not respond.

Let's use another webserver for owncloud then and let Hiawatha handle the rest.
When using Hiawatha as reverse proxy for nginx, owncloud runs fine but there are gateway timeouts (504) after just roughly 5 seconds of computing - also large downloads don't finish. Is there any way to adjust this threshold? Neither TimeForRequest, nor TimeForCGI do any good. Using nginx directly doesn't lead to any errors.

Is there a setting that handles the timeouts in the reverse proxy case?

Thanks again for all your time and the wonderful support!
This topic has been closed.