couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rian R. Maloney" <>
Subject Replication of specific binary attachment is extremely slow
Date Tue, 21 Jan 2014 04:26:53 GMT

Hello Couch Community -

I have an odd problem that I could use some help with.

I am using couch replication for attachments that are essentially a bunch of concatenated
TIFF images with some text in between each image. When I replicate a database with a single
document that has a single binary attachment that is only 4.5mb it takes 30+ seconds to complete.

If I zip the file it is sub second to completion

My test cases have been on Windows 7 and Mac OS x10.7.5 running either CouchDB 1.3, 1.4 or

I am doing local replication 

The CPU spikes for the entire duration

When I use Futon to kick off the replication, it is sub second to completion but when I POST
to replicate, it takes 30+ seconds

Exact test case on Win 7 laptop, Couch 1.5.0:

Using Futon :
  Create a database called from and a database called to
  Create a document with id as "test"
  Upload the 4.5mb binary file attachment. Couch assigns the mime type as  application/octet-stream
  I have tried other mime types and other file types

Using PHP:
  POST to replicate from= localhost/from  to= localhost/to

Here is the response from the post request:

    [ok] => 1
    [session_id] => fc9e35341f4ffb989517d27ae9a1aca6
    [source_last_seq] => 2
    [replication_id_version] => 3
    [history] => Array
            [0] => stdClass Object
                    [session_id] => fc9e35341f4ffb989517d27ae9a1aca6
                    [start_time] => Tue, 21 Jan 2014 04:02:28 GMT
                    [end_time] => Tue, 21 Jan 2014 04:03:41 GMT
                    [start_last_seq] => 0
                    [end_last_seq] => 2
                    [recorded_seq] => 2
                    [missing_checked] => 1
                    [missing_found] => 1
                    [docs_read] => 1
                    [docs_written] => 1
                    [doc_write_failures] => 0



Finally, if I zip the file the replication completes in less than a second.

I can upload the attachment if anyone is interested but I understand people may be concerned
about viruses etc so Ill wait to send if anyone requests. Again, the attachment is an ANSII
X9.37 file layout which is basically a bunch of tiff images concatenated with other binary
and text between each tiff image.

Thanks in advance for any help or ideas.



“I've seen things you people wouldn't believe. Attack ships on fire off the shoulder of
Orion. I watched C-beams glitter in the dark near the Tannhäuser Gate. All those moments
will be lost in time, like tears in rain. Time to Relax.” - Roy Batty
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message