"So clearly, something internal is ignoring the "content_type", and examining the file contents. Then deciding what to do about it."
There’s no such code in CouchDB. There’s a list of mime types that CouchDB will compress and that’s it. The attachment names are not relevant to CouchDB but it’s possible that client tools are using it to determine a mime type. B. On 23 Jan 2014, at 22:27, Scott Weber <[email protected]> wrote: > I have seen the same thing as the poster below. Does anyone have a fix? Work > around? > > It would seem that the database server is doing some kind of inspection of > the > > attachments and deciding how to move them around (Based 64, UTF16, etc...). > > Is this the case? > > Here is what I tried: > I attached a mixed content file to a document (text+binary, kind of like a > PDF). This was about 3 meg or so. Then I triggered a replication to another > database. It took 30 seconds to replicate it *on the same box*. > > I deleted everything, and made several repeats of the this test. > > I renamed the file to *.BIN, then uploaded it. Still took too long to > replicate. > > I renamed the file to *.TXT, then uploaded it. Still took too long to > replicate. > > I renamed the file to *.EXE, then uploaded it. Still took too long to > replicate. > > However, when I upload an *actual* executable file of about the same size, it > replicates it in about 1 second. > > In all cases, the "content_type" of the attachment was correct to the file > type. > > So clearly, something internal is ignoring the "content_type", and examining > the file contents. Then deciding what to do about it. > > Is this expected behavior? How can I get the system to simply pass > attachments as binary without do whatever it is doing. > > Thanks for any advice. > > -Scott > > >> From "Rian R. Maloney" <[email protected]> >> 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 1.5 > >> >> 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 ... >
