Example of error returned by Solr:
"Expected mime type application/octet-stream but got application/xml. <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<response>\n<lst name=\"error\"><str name=\"msg\">application/x-www-form-urlencoded content length (3091319 bytes) exceeds upload limit of 2048 KB</str><int name=\"code\">400</int></lst>\n</response>\n
How to solve it:
Direct solution
- Increase the limit in your solrconfig.xml file, for example:
<requestDispatcher handleSelect="false" >
<requestParsers enableRemoteStreaming="true" multipartUploadLimitInKB="2048000" formdataUploadLimitInKB="32768"
addHttpRequestToContext="false"/>
<httpCaching never304="true" />
</requestDispatcher> - Restart your Solr instances:
service solr-server restart
Workarounds
- if you does not need all the data, set smaller rows limit in the query
- use shorter format for the response - use CSV format and retrieve the necessary fields only