couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tillmann Seidel <>
Subject Re: Data corruption problem with attachments
Date Mon, 12 Sep 2011 09:47:56 GMT
Finally I got access to the CouchDB logs and it seems this is another bad_utf8_character_code

My document looks like this:


When trying to access the first attachment, an HTTP code 200 is returned, but without content.
Additionally the log displays an UTF-8 encoding problem:

[Mon, 12 Sep 2011 08:34:16 GMT] [info] [<0.25582.1>] - - 'GET' /updateserver/72de8a27-c3d1-3626-b6ff-190925a990e4/ea_seite03.png
[Mon, 12 Sep 2011 08:34:16 GMT] [error] [<0.25582.1>] Uncaught error in HTTP request:
[Mon, 12 Sep 2011 08:34:16 GMT] [info] [<0.25582.1>] Stacktrace: [{couch_stream,foldl,6},
[Mon, 12 Sep 2011 08:34:16 GMT] [error] [<0.25582.1>] {error_report,<0.33.0>,
[Mon, 12 Sep 2011 08:34:16 GMT] [error] [<0.105.0>] {error_report,<0.33.0>,

It does not seem to be one of the known issues with UTF-8 encoding. I'm accessing an attachment
with content type image/png (so encoding should not matter here) with an URL that seems to
have no problematic characters.
Any ideas?

This problem happened with CouchDB 1.0.2 on Windows.


On Sep 7, 2011, at 4:57 PM, Robert Newson wrote:

> If you supply a Content-MD5 header in your request we will verify it
> (and reject a mismatch) just like Amazon S3 does. That doesn't imply
> that couchdb routinely corrupts attachments (it doesn't).
> Can you paste a full request/response where you regard the result as
> truncated or corrupted? What client software are you using? Can you
> reproduce this with curl?
> B.
> On 7 September 2011 14:53, Tillmann Seidel <> wrote:
>> Hi,
>> I have a problem with data corruption on CouchDB. I'm creating documents with attachments
using PUT requests in CouchDB 1.0.2 . Once in a while it happens that a stored document is
corrupt, i.e. an attachment is truncated or has no data at all.  CouchDB does not return an
error though when the document is created.
>> The description of COUCHDB-558 makes me think that this is a problem that's not unheard
>> "We could detect in-flight data corruption if a client sends a Content-MD5 header
along with the data and Couch validates the MD5 on arrival."
>> Now my question is: what might cause such an in-flight data corruption? And what
could I do to prevent it? Or if I cannot prevent it, can I at least make CouchDB detect it
during creation?
>> Thanks in advance
>> Tillmann

Tillmann Seidel
Innoopract Informationssysteme GmbH
Tel: +49-721-66-47-33-0
Fax: +49-721-66-47-33-29

Innoopract Informationssysteme GmbH
Lammstr. 21, 76133 Karlsruhe, Germany
General Manager: Jochen Krause 
Registered Office: Karlsruhe, Commercial Register Mannheim HRB 107883

View raw message