{"action":"created","issue":{"url":"https://api.github.com/repos/bitfireAT/davdroid/issues/539","labels_url":"https://api.github.com/repos/bitfireAT/davdroid/issues/539/labels{/name}","comments_url":"https://api.github.com/repos/bitfireAT/davdroid/issues/539/comments","events_url":"https://api.github.com/repos/bitfireAT/davdroid/issues/539/events","html_url":"https://github.com/bitfireAT/davdroid/issues/539","id":85821581,"number":539,"title":"OwnCloud times out since DAVdroid/0.8.0","user":{"login":"stuart12","id":213745,"avatar_url":"https://avatars.githubusercontent.com/u/213745?v=3","gravatar_id":"","url":"https://api.github.com/users/stuart12","html_url":"https://github.com/stuart12","followers_url":"https://api.github.com/users/stuart12/followers","following_url":"https://api.github.com/users/stuart12/following{/other_user}","gists_url":"https://api.github.com/users/stuart12/gists{/gist_id}","starred_url":"https://api.github.com/users/stuart12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stuart12/subscriptions","organizations_url":"https://api.github.com/users/stuart12/orgs","repos_url":"https://api.github.com/users/stuart12/repos","events_url":"https://api.github.com/users/stuart12/events{/privacy}","received_events_url":"https://api.github.com/users/stuart12/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bitfireAT/davdroid/labels/question","name":"question","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2015-06-06T23:18:07Z","updated_at":"2015-06-10T22:40:56Z","closed_at":null,"body":"DAVdroid 0.7.x was syncing fine with my home run Debian/wheezy ownCloud 7.0.2+dfsg-1~bpo70+2 server. I upgraded to DAVdroid 0.8.0 and syncing the calendar stopped working. My contacts are still syncing fine.  When I force a calendar sync the wheel turns for ~ 49 seconds (on the server apache2 is using 98% of the CPU during this time) and then the sync stops and the time of the last successful sync (\"1/06/2015 21:05\") is shown again.\r\n\r\nThe logs show:\r\n```\r\nD/davdroid.SyncManager( 8840): Last local CTag = 10474; current remote CTag = 10477\r\nI/davdroid.SyncManager( 8840): Fetching remote resource list\r\nD/HttpClient( 8840): Connection request: [route: HttpRoute[{s}->https://owncloud.?????:443]][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 3]\r\nD/HttpClient( 8840): Connection leased: [id: 40][route: HttpRoute[{s}->https://owncloud.?????:443]][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 3]\r\nD/HttpClient( 8840): Executing request REPORT /remote.php/caldav/calendars/stuart/personal/ HTTP/1.1\r\nD/HttpClient( 8840): Target auth state: SUCCESS\r\nD/HttpClient( 8840): Proxy auth state: UNCHALLENGED\r\nD/Wire    ( 8840): http-outgoing-40 >> \"REPORT /remote.php/caldav/calendars/stuart/personal/ HTTP/1.1[\\r][\\n]\"\r\nD/Wire    ( 8840): http-outgoing-40 >> \"Content-Type: text/xml; charset=UTF-8[\\r][\\n]\"\r\nD/Wire    ( 8840): http-outgoing-40 >> \"Accept: text/xml[\\r][\\n]\"\r\nD/Wire    ( 8840): http-outgoing-40 >> \"Depth: 1[\\r][\\n]\"\r\nD/Wire    ( 8840): http-outgoing-40 >> \"Content-Length: 260[\\r][\\n]\"\r\nD/Wire    ( 8840): http-outgoing-40 >> \"Host: owncloud.?????[\\r][\\n]\"\r\nD/Wire    ( 8840): http-outgoing-40 >> \"Connection: Keep-Alive[\\r][\\n]\"\r\nD/Wire    ( 8840): http-outgoing-40 >> \"User-Agent: DAVdroid/0.8.0[\\r][\\n]\"\r\nD/Wire    ( 8840): http-outgoing-40 >> \"Authorization: Basic c3R1YXJ0OW15NjcxSuaw==[\\r][\\n]\"\r\nD/Wire    ( 8840): http-outgoing-40 >> \"[\\r][\\n]\"\r\nD/Wire    ( 8840): http-outgoing-40 >> \"<C:calendar-query xmlns:C=\"urn:ietf:params:xml:ns:caldav\" xmlns=\"DAV:\">[\\n]\"\r\nD/Wire    ( 8840): http-outgoing-40 >> \"   <C:filter>[\\n]\"\r\nD/Wire    ( 8840): http-outgoing-40 >> \"      <C:comp-filter name=\"VCALENDAR\">[\\n]\"\r\nD/Wire    ( 8840): http-outgoing-40 >> \"         <C:comp-filter name=\"VEVENT\"/>[\\n]\"\r\nD/Wire    ( 8840): http-outgoing-40 >> \"      </C:comp-filter>[\\n]\"\r\nD/Wire    ( 8840): http-outgoing-40 >> \"   </C:filter>[\\n]\"\r\nD/Wire    ( 8840): http-outgoing-40 >> \"   <prop>[\\n]\"\r\nD/Wire    ( 8840): http-outgoing-40 >> \"      <getetag/>[\\n]\"\r\nD/Wire    ( 8840): http-outgoing-40 >> \"   </prop>[\\n]\"\r\nD/Wire    ( 8840): http-outgoing-40 >> \"</C:calendar-query>\"\r\nD/davdroid.DavSyncAdapter( 8840): Closing httpClient\r\nD/Wire    ( 8840): http-outgoing-40 << \"[read] I/O error: Read timed out\"\r\nD/HttpClient( 8840): http-outgoing-40: Close connection\r\nD/HttpClient( 8840): http-outgoing-40: Shutdown connection\r\nD/HttpClient( 8840): Connection discarded\r\nD/HttpClient( 8840): http-outgoing-40: Close connection\r\nD/HttpClient( 8840): Connection released: [id: 40][route: HttpRoute[{s}->https://owncloud.?????:443]][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 3]\r\nE/davdroid.DavSyncAdapter( 8840): I/O error (Android will try again later)\r\nE/davdroid.DavSyncAdapter( 8840): java.net.SocketTimeoutException: Read timed out\r\nE/davdroid.DavSyncAdapter( 8840): \tat com.android.org.conscrypt.NativeCrypto.SSL_read(Native Method)\r\nE/davdroid.DavSyncAdapter( 8840): \tat com.android.org.conscrypt.OpenSSLSocketImpl$SSLInputStream.read(OpenSSLSocketImpl.java:690)\r\nE/davdroid.DavSyncAdapter( 8840): \tat org.apache.http.impl.conn.LoggingInputStream.read(LoggingInputStream.java:87)\r\nE/davdroid.DavSyncAdapter( 8840): \tat org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:136)\r\nE/davdroid.DavSyncAdapter( 8840): \tat org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:152)\r\nE/davdroid.DavSyncAdapter( 8840): \tat org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:270)\r\nE/davdroid.DavSyncAdapter( 8840): \tat org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:140)\r\nE/davdroid.DavSyncAdapter( 8840): \tat org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)\r\nE/davdroid.DavSyncAdapter( 8840): \tat org.apache.http.impl.io.AbstractMessageParserHC4.parse(AbstractMessageParserHC4.java:260)\r\nE/davdroid.DavSyncAdapter( 8840): \tat org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:161)\r\nE/davdroid.DavSyncAdapter( 8840): \tat org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:153)\r\nE/davdroid.DavSyncAdapter( 8840): \tat org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:279)\r\nE/davdroid.DavSyncAdapter( 8840): \tat org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:121)\r\nE/davdroid.DavSyncAdapter( 8840): \tat org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:260)\r\nE/davdroid.DavSyncAdapter( 8840): \tat org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195)\r\nE/davdroid.DavSyncAdapter( 8840): \tat org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:86)\r\nE/davdroid.DavSyncAdapter( 8840): \tat org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108)\r\nE/davdroid.DavSyncAdapter( 8840): \tat org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:178)\r\nE/davdroid.DavSyncAdapter( 8840): \tat org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)\r\nE/davdroid.DavSyncAdapter( 8840): \tat at.bitfire.davdroid.webdav.WebDavResource.report(WebDavResource.java:339)\r\nE/davdroid.DavSyncAdapter( 8840): \tat at.bitfire.davdroid.resource.RemoteCollection.getMemberETags(RemoteCollection.java:100)\r\nE/davdroid.DavSyncAdapter( 8840): \tat at.bitfire.davdroid.syncadapter.SyncManager.synchronize(SyncManager.java:78)\r\nE/davdroid.DavSyncAdapter( 8840): \tat at.bitfire.davdroid.syncadapter.DavSyncAdapter.onPerformSync(DavSyncAdapter.java:146)\r\nE/davdroid.DavSyncAdapter( 8840): \tat android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:259)\r\nI/davdroid.DavSyncAdapter( 8840): Sync complete for com.android.calendar\r\nD/HttpClient( 8840): Connection manager is shutting down\r\nD/HttpClient( 8840): Connection manager shut down\r\n```\r\n\r\nI tried to simulate the above request using curl to get an idea of how long ownCloud needs to complete the request.  Is this the right way to do a REPORT request using curl?\r\n```\r\n:; time curl  -o /tmp/report -v -X REPORT  --user \"$user:$pw\" -d @/tmp/filename.dat https://$host/remote.php/caldav/calendars/$user/personal/\r\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\r\n                                 Dload  Upload   Total   Spent    Left  Speed\r\n  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 88.171.134.228...\r\n* Connected to owncloud.????? (88.171.134.228) port 443 (#0)\r\n* found 174 certificates in /etc/ssl/certs/ca-certificates.crt\r\n* ALPN, offering http/1.1\r\n  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* SSL connection using TLS1.2 / RSA_AES_128_CBC_SHA1\r\n* \t server certificate verification OK\r\n* \t server certificate status verification SKIPPED\r\n* \t common name: owncloud.????? (matched)\r\n* \t server certificate expiration date OK\r\n* \t server certificate activation date OK\r\n* \t certificate public key: RSA\r\n* \t certificate version: #3\r\n* \t subject: C=IT,L=Sydney,O=Pook IT,CN=owncloud.?????\r\n* \t start date: Tue, 11 Nov 2014 23:02:37 GMT\r\n* \t expire date: Fri, 29 Oct 2066 23:02:37 GMT\r\n* \t issuer: C=IT,L=Sydney,O=Pook IT,CN=owncloud.?????\r\n* \t compression: NULL\r\n* ALPN, server did not agree to a protocol\r\n* Server auth using Basic with user 'stuart'\r\n> REPORT /remote.php/caldav/calendars/stuart/personal/ HTTP/1.1\r\n> Host: owncloud.?????\r\n> Authorization: Basic c3rR1YXJ0jw+oSnVuaw==\r\n> User-Agent: curl/7.42.1\r\n> Accept: */*\r\n> Content-Length: 251\r\n> Content-Type: application/x-www-form-urlencoded\r\n> \r\n} [251 bytes data]\r\n* upload completely sent off: 251 out of 251 bytes\r\n100   251    0     0  100   251      0      2  0:02:05  0:01:45  0:00:20     0< HTTP/1.1 207 Multi-Status\r\n< Date: Sat, 06 Jun 2015 22:51:01 GMT\r\n< Server: Apache\r\n< X-Powered-By: PHP/5.4.39-0+deb7u2\r\n< Set-Cookie: oce327bbe=tr9omm7; path=/; HttpOnly\r\n< Expires: Thu, 19 Nov 1981 08:52:00 GMT\r\n< Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0\r\n< Pragma: no-cache\r\n< Strict-Transport-Security: max-age=31536000\r\n< X-XSS-Protection: 1; mode=block\r\n< X-Content-Type-Options: nosniff\r\n< X-Frame-Options: Sameorigin\r\n< Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; frame-src *; img-src *; font-src 'self' data:; media-src *\r\n< X-Robots-Tag: none\r\n< Set-Cookie: oce3247b7abe=29m1l64ha5; path=/; secure; HttpOnly\r\n< Vary: Brief,Prefer\r\n< Transfer-Encoding: chunked\r\n< Content-Type: application/xml; charset=utf-8\r\n< \r\n{ [7 bytes data]\r\n100  997k    0  997k  100   251   9591      2  0:02:05  0:01:46  0:00:19  227k\r\n* Connection #0 to host owncloud.????? left intact\r\n\r\nreal\t1m46.480s\r\nuser\t0m0.020s\r\nsys\t0m0.012s\r\n:; cat /tmp/filename.dat \r\n<C:calendar-query xmlns:C=\"urn:ietf:params:xml:ns:caldav\" xmlns=\"DAV:\">\r\n   <C:filter>\r\n      <C:comp-filter name=\"VCALENDAR\">\r\n         <C:comp-filter name=\"VEVENT\"/>\r\n      </C:comp-filter>\r\n   </C:filter>\r\n   <prop>\r\n      <getetag/>\r\n   </prop>\r\n</C:calendar-query>\r\n```\r\nMy ownCloud server is a [SheevaPlug](https://en.wikipedia.org/wiki/SheevaPlug) and I'm the only user."},"comment":{"url":"https://api.github.com/repos/bitfireAT/davdroid/issues/comments/110938021","html_url":"https://github.com/bitfireAT/davdroid/issues/539#issuecomment-110938021","issue_url":"https://api.github.com/repos/bitfireAT/davdroid/issues/539","id":110938021,"user":{"login":"dper","id":3026536,"avatar_url":"https://avatars.githubusercontent.com/u/3026536?v=3","gravatar_id":"","url":"https://api.github.com/users/dper","html_url":"https://github.com/dper","followers_url":"https://api.github.com/users/dper/followers","following_url":"https://api.github.com/users/dper/following{/other_user}","gists_url":"https://api.github.com/users/dper/gists{/gist_id}","starred_url":"https://api.github.com/users/dper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dper/subscriptions","organizations_url":"https://api.github.com/users/dper/orgs","repos_url":"https://api.github.com/users/dper/repos","events_url":"https://api.github.com/users/dper/events{/privacy}","received_events_url":"https://api.github.com/users/dper/received_events","type":"User","site_admin":false},"created_at":"2015-06-10T22:40:56Z","updated_at":"2015-06-10T22:40:56Z","body":"I suggest that the third option, an exponential backup, is not worth the time spent on it. You could screw up implementing it, and all to work around a server side bug.  If one were to use a client side fix to fix a server side problem, a simple fix such as the second one -- extending the time to 300 seconds -- is the simplest and therefore safest choice.  Whether that is worthwhile on the whole I do not know.  After all, what do you do, add it and then remove it a year from now when most (but not all!) servers have upgraded to a less buggy OwnCloud? That's no good, so maybe it stays around for a very long time."}}