No results from Apache Solr? Check your Tomcat settings!
In one of our current customer projects we experienced random errors for queries to our Apache Solr Index. We sent a large amounts of facet queries and our results page kind of took very long to be built or stayed blank. We looked into the devlog, but we could not see any problems with the solr query sent by the plugin to the solr server.
We started to investigate the case by looking at the logfiles of the different servers in between. As we use NGINX to proxy and secure the Apache Solr Server we looked at the logfiles there first and if our proxy buffer settings were ok. All was well at that level. We continued in looking at the logfiles of Apache Solr and we found that the queries did not arrive to the query handler.
What could be the source of that strange behaviour. Where did our queries remain? What is the cause for some queries to dissapear?
We extracted the query from the Devlog of the extension and pasted it into a texteditor. Wow the query was huge! So we had an idea on what could be the cause.
We googled for terms like: tomcat url size and found a setting in the server.xml that we could tweak.
maxHttpHeaderSize
A question on serverfault.com gave us final help.
http://serverfault.com/questions/56691/whats-the-maximum-url-length-in-tomcat
We changed the maxHttpHeaderSize to 65536 and after a restart of Tomcat our queries started to work!
server.xml
<Connector port="8080" protocol="HTTP/1.1"
maxHttpHeaderSize="65536"
connectionTimeout="20000"
redirectPort="8443"
address="127.0.0.1"
URIEncoding="UTF-8" />
We have changed to settings in Revision 88095 of the EAP and we will ship this in the upcoming public release.
Happy searching with TYPO3 and Apache Solr,
Olivier Dobberkau



