What you are doing is requesting the full amount of ALL documents. This is not a typical query; rather, it is a DB dump. A request is called that will display all this data, and then send it via tomcat, which again buffers all the data and then sends it to you. This is a large dataset for sending on one request.
What is the purpose of your request? If you want to receive all the documents, you must either reset them using a program, for example, mlcp, or get them in smaller batches, first collecting the URI and then extracting the documents. This can be accelerated by doing parallel document collection. You can see examples of the Java source in xmlsh, which shows how to correctly receive documents in XCC
http://xmlsh.svn.sourceforge.net/viewvc/xmlsh/extensions/marklogic/src/org/xmlsh/marklogic/get.java?revision=792&view=markup
My guess (correct me if I am wrong) is that you are simply experimenting and do not really need all the documents. In this case, you should try a more realistic query.
source share