Problem with large Attachments > 1MB

97 views
Skip to first unread message

Sascha Lüdecke

unread,
Aug 7, 2014, 5:45:50 AM8/7/14
to mobile-c...@googlegroups.com

Hi all,

 

we are adding image attachments larger than 1MB to our documents using

 

UnsavedRevision newRev = doc.createRevision();

newRev.setAttachment(filename, mimeType, stream);

newRev.save();

 

When the sync_gateway (1.0.0-23; commit abbfd465) is started as a walrus database, everything is replicated nice and smothely. When the sync_gateway is connected to a couchbase server (2.2.0 community edition (build-837)), the couchbase server chokes on them with repeated messages in error and debug log:

 

[mapreduce_errors:error,2014-08-06T8:17:05.255,ns...@127.0.0.1:<0.16636.37>:couch_set_view_updater:load_doc:483]Bucket `usercontent_publicbeta`, main group `_design/sync_gateway`, skipping document with ID `_sync:att:sha1-+BNbV0BRAZNtU/IM8oqWUthvfYc=`: too large body (2832362 bytes)

 

As far as I have been able to read, the limit of documents in the server is 10 MB so those images should work fine.

 

Any ideas / pointers?

 

Best regards,

Sascha

Traun Leyden

unread,
Aug 7, 2014, 12:40:51 PM8/7/14
to mobile-c...@googlegroups.com
@Andrei could you try to reproduce this via cblite-tests?

@Sascha can you file an issue against sync gw?

Andy and I are in the process of setting up a dedicated system for the TodoLite backend, I wonder if we'll run into the same issue.
--
You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mobile-couchba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/2351640.2Za7ljy6nD%40slux.
For more options, visit https://groups.google.com/d/optout.

Traun Leyden

unread,
Aug 8, 2014, 9:59:35 AM8/8/14
to mobile-c...@googlegroups.com
It might be related to this ticket:


On Aug 7, 2014, at 2:45 AM, Sascha Lüdecke <sas...@meta-x.de> wrote:

--

Traun Leyden

unread,
Aug 8, 2014, 11:06:06 AM8/8/14
to mobile-c...@googlegroups.com
Actually after re-reading issue #374 more carefully, I take that back.

Traun Leyden

unread,
Aug 11, 2014, 1:46:40 PM8/11/14
to mobile-c...@googlegroups.com
Hi Sascha,

Andrei tried to reproduce this, and here was the result:

I've added test for this case: attachments > 2M, replication lite1->SG->CB/walrus->SG->lite2
https://github.com/couchbaselabs/cblite-tests/blob/master/tests/cbl-replication-attachements.js 
and don't see any issues. I also run this test against 2.2.0 and there is no problem

Regarding the "too large body" issue you are seeing, I think this error could happen if you added a map function directly to couchbase server which did not ignore _sync documents (I've done this accidentally before, see https://github.com/couchbase/sync_gateway/issues/374)

If that's not the issue, please provide more guidance on how we can reproduce the problem.



--
Reply all
Reply to author
Forward
0 new messages