_all_docs query returns partial information, just: {"rows":[


#1

Lately sync gateway has been returning a partial value for the _all_docs query (with include_docs = true), it just returns:
{“rows”:[

Does this mean there were too many rows returned and it couldn’t fit them all in the response so it just returned none? I see some broken pipe errors in the sync gateway log, so could it be that instead?

14:32:36.376616 HTTP: #390359:     --> 599 Write error: write tcp 127.0.0.1:50186: broken pipe  (0.0 ms)

#2

@alexegli

There is not a lot of information here, but it appears that the client is timing out the connection before the result is available.

Can you tell us:

Which version of Sync Gateway and Couchbase Server you are running.

How many documents are in your Couchbase Server bucket and the average size of your documents.

Also how are you calling _all_docs in your test, if you re using curl, you can extend the maximum time the call can take by setting --max-time on the command line.


#3

This seems to happen to more often as the number of open connections increases. I’m calling _all_docs with the REST url:

http://<hostname>/<db name>/_all_docs?include_docs=true

I’m not sure about average size, but probably over 2KB per doc. The average number returned to the user I was making the call with is about 687 docs. I’m running couchbase version 2.5.1, sync gateway 1.0.2.
I can’t configure my nginx sync gateway proxy with the correct keep alive timeouts as specified in the docs though because it just keeps building up connections until I run out of TCP connections on my server, and I can’t specify the Accept and Server headers or the HTTP 1.1 protocol because our iOS app can’t sync if I specify those. I’m not sure if not being able to use those config parameters could be causing this though.