couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Tisdall <>
Subject couchdb returning truncated JSON
Date Sat, 18 Aug 2012 23:46:33 GMT
I have a script where I query a view for multiple entries of data.
I'm doing it in batches of 1000.  It works fine multiple times and
then suddenly it returns a result that doesn't properly parse as JSON
because it's missing some content at the end (not sure how much, but
it's at least missing the final bracket to make it complete).

My logs don't point out any problem...

[Sat, 18 Aug 2012 22:14:08 GMT] [debug] [<0.26768.3>] 'POST'
/app_stats/_design/processing/_view/blanks {1,0} from ""
Headers: [{'Content-Length',"14010"},
[Sat, 18 Aug 2012 22:14:08 GMT] [debug] [<0.26768.3>] OAuth Params: []
[Sat, 18 Aug 2012 22:14:08 GMT] [debug] [<0.26768.3>] request_group
{Pid, Seq} {<0.20450.3>,95240673}
[Sat, 18 Aug 2012 22:14:08 GMT] [info] [<0.26768.3>] - -
POST /app_stats/_design/processing/_view/blanks 200

Here's what I received from couchdb:

HTTP/1.0 200 OK
Server: CouchDB/1.2.0 (Erlang OTP/R14A)
Date: Sat, 18 Aug 2012 22:22:10 GMT
Content-Type: text/plain; charset=utf-8
Cache-Control: must-revalidate

      [  **  SNIP **  ]

it seems to consistently truncate at a point where the next character
should either be another comma or a closing square bracket (to close
the "rows" array).

I tried changing the script to do batches of 100 and it seems to be
running without problems.  Shouldn't there be some sort of error,

View raw message