Is there a file size limit for attachments?

71 views
Skip to first unread message

Brendan Duddridge

unread,
Jul 22, 2016, 6:26:44 PM7/22/16
to Couchbase Mobile
Hi,

I'm using Cloudant (porter server in London, which is CouchDB 2.0) and I'm trying to sync a document which has multiple attachments. One of the attachments is 300 MB big.

But I'm getting timeout errors during the sync:

16:13:33.489 Sync: CBLRestPusher[https://myaccount.cloudant.com/db-757c0197a63d47e48a9d98e2ca7c2042]: postProgressChanged (18/19, active=1 (batch=0, net=1), lastSeq=24441, online=1, error=(null))

16:13:33.489 Sync: CBLRestPusher[https://myaccount.cloudant.com/db-757c0197a63d47e48a9d98e2ca7c2042]: Queuing CBLMultipartUploader[PUT https://myaccount.cloudant.com/db-757c0197a63d47e48a9d98e2ca7c2042/rec-369c3e967cef48e69c7ccf9acde51299?new_edits=false] (multipart, 294046kb)

16:13:33.489 Sync: CBLRestPusher[https://myaccount.cloudant.com/db-757c0197a63d47e48a9d98e2ca7c2042]: Starting CBLMultipartUploader[PUT https://myaccount.cloudant.com/db-757c0197a63d47e48a9d98e2ca7c2042/rec-369c3e967cef48e69c7ccf9acde51299?new_edits=false]

16:13:33.490| Sync: CBLReplication[to https://myaccount.cloudant.com/db-757c0197a63d47e48a9d98e2ca7c2042]: active, progress = 18 / 19, err: (null)

16:16:34.035 CBLMultipartUploader[PUT https://myaccount.cloudant.com/db-757c0197a63d47e48a9d98e2ca7c2042/rec-369c3e967cef48e69c7ccf9acde51299?new_edits=false]: Got error NSURLError[-1001, "The request timed out.", <https://myaccount.cloudant.com/db-757c0197a63d47e48a9d98e2ca7c2042/rec-369c3e967cef48e69c7ccf9acde51299?new_edits=false>]<--CFCFNetworkError[-1001]



Does the multi-part uploader stream the uploads? Or maybe it has a too small timeout value for lunch a large attachment?


Eventually it fails and tries again:

2016-07-22 16:22:48.942 Tap Forms 5[50460:1656131] Error pushing: Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={NSUnderlyingError=0x6180000499f0 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "(null)" UserInfo={_kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4}}, NSErrorFailingURLStringKey=https://myaccount.cloudant.com/db-757c0197a63d47e48a9d98e2ca7c2042/rec-369c3e967cef48e69c7ccf9acde51299?new_edits=false, NSErrorFailingURLKey=https://myaccount.cloudant.com/db-757c0197a63d47e48a9d98e2ca7c2042/rec-369c3e967cef48e69c7ccf9acde51299?new_edits=false, _kCFStreamErrorDomainKey=4, _kCFStreamErrorCodeKey=-2102, NSLocalizedDescription=The request timed out.}

16:23:48.968 Sync: CBLRestPusher[https://myaccount.cloudant.com/db-757c0197a63d47e48a9d98e2ca7c2042] RETRYING, to transfer missed revisions...

16:23:48.968 Sync: CBLRestPusher[https://myaccount.cloudant.com/db-757c0197a63d47e48a9d98e2ca7c2042] Progress: set error = (null)

16:23:48.968 Sync: CBLRestPusher[https://myaccount.cloudant.com/db-757c0197a63d47e48a9d98e2ca7c2042]: postProgressChanged (19/19, active=0 (batch=0, net=0), lastSeq=24441, online=1, error=(null))

16:23:48.968 Sync: CBLRestPusher[https://myaccount.cloudant.com/db-757c0197a63d47e48a9d98e2ca7c2042] Progress: set active = 1

16:23:48.968 Sync: CBLRestPusher[https://myaccount.cloudant.com/db-757c0197a63d47e48a9d98e2ca7c2042]: postProgressChanged (19/19, active=1 (batch=0, net=1), lastSeq=24441, online=1, error=(null))

16:23:48.968 Sync: CBLRestPusher[https://myaccount.cloudant.com/db-757c0197a63d47e48a9d98e2ca7c2042]: Successfully logged in!

16:23:48.969 Sync: <CBLRemoteSession: 0x6100000896f0>: GET /db-757c0197a63d47e48a9d98e2ca7c2042/_local/cedcc5f683575f3f19dcfa63bd370d7866b59d46

16:23:48.969 DEALLOC CBLRemoteLogin[https://myaccount.cloudant.com/db-757c0197a63d47e48a9d98e2ca7c2042]

16:23:48.969| Sync: CBLReplication[to https://myaccount.cloudant.com/db-757c0197a63d47e48a9d98e2ca7c2042]: active, progress = 19 / 19, err: (null)

16:23:49.726 Sync: CBLRestPusher[https://myaccount.cloudant.com/db-757c0197a63d47e48a9d98e2ca7c2042]: Replicating from lastSequence=24441

16:23:49.734 Sync: CBLRestPusher[https://myaccount.cloudant.com/db-757c0197a63d47e48a9d98e2ca7c2042]: Received 1 revs

16:23:49.734 Sync: *** CBLRestPusher[https://myaccount.cloudant.com/db-757c0197a63d47e48a9d98e2ca7c2042]: BEGIN processInbox (1 sequences)

16:23:49.734 Sync: <CBLRemoteSession: 0x6100000896f0>: POST /db-757c0197a63d47e48a9d98e2ca7c2042/_revs_diff

16:23:49.734 Sync: *** CBLRestPusher[https://myaccount.cloudant.com/db-757c0197a63d47e48a9d98e2ca7c2042]: END processInbox (lastSequence=24441)

16:23:49.903 Sync: CBLRestPusher[https://myaccount.cloudant.com/db-757c0197a63d47e48a9d98e2ca7c2042]: postProgressChanged (19/20, active=1 (batch=0, net=1), lastSeq=24441, online=1, error=(null))

16:23:49.903 Sync: CBLRestPusher[https://myaccount.cloudant.com/db-757c0197a63d47e48a9d98e2ca7c2042]: Queuing CBLMultipartUploader[PUT https://myaccount.cloudant.com/db-757c0197a63d47e48a9d98e2ca7c2042/rec-369c3e967cef48e69c7ccf9acde51299?new_edits=false] (multipart, 294046kb)

16:23:49.903 Sync: CBLRestPusher[https://myaccount.cloudant.com/db-757c0197a63d47e48a9d98e2ca7c2042]: Starting CBLMultipartUploader[PUT https://myaccount.cloudant.com/db-757c0197a63d47e48a9d98e2ca7c2042/rec-369c3e967cef48e69c7ccf9acde51299?new_edits=false]

16:23:49.903| Sync: CBLReplication[to https://myaccount.cloudant.com/db-757c0197a63d47e48a9d98e2ca7c2042]: active, progress = 19 / 20, err: (null)



I'm hoping that eventually it will work and the file will be synced.

Thanks,

Brendan

Brendan Duddridge

unread,
Jul 22, 2016, 6:51:08 PM7/22/16
to Couchbase Mobile
Using Charles to inspect the request, it gets to about 2 minutes into the transfer and then suddenly there's a broken pipe. It then tries again. But again, after 2 minutes there's a broken pipe. With my connection speed I get about 135 MB to 139 MB uploaded in that time.

Could it be a Couchbase Lite timeout that's triggering the broken pipe?

Thanks,

Brendan

Jens Alfke

unread,
Jul 25, 2016, 1:55:47 PM7/25/16
to mobile-c...@googlegroups.com

On Jul 22, 2016, at 3:51 PM, Brendan Duddridge <bren...@gmail.com> wrote:

Could it be a Couchbase Lite timeout that's triggering the broken pipe?

That’s my guess. There’s no size limit on attachments. NSURLSession is only supposed to time out if there’s no data being received, not just if the request takes a long time; but the changeover from NSURLConnection to NSURLSession is fairly recent (part of 1.3) so maybe I haven’t set the session options quite right…

File an issue, please?

—Jens

Brendan Duddridge

unread,
Jul 25, 2016, 3:27:17 PM7/25/16
to Couchbase Mobile
Reply all
Reply to author
Forward
0 new messages