Troubleshooting Solr

Last updated on
30 April 2025
Your facet blocks are not appearing
First make sure you have the appropriate filters enabled at admin/settings/apachesolr/enabled-filters, and the blocks positioned in their correct regions at admin/build/block.

Do you have the Active Search feature of Javascript Tools enabled? There is a possible incompatibility with the ApacheSolr module and you should test with the Active Search feature turned off.

The devel module could also prevent the facet blocks from being shown.

Issues with accents / Add UTF-8 support
Although Solr supports UTF-8 by default, Tomcat does not. You can enable the character encoding by doing the following in Tomcat's server.xml:
  • Add URIEncoding="UTF-8" to the correct Connector
  • Be sure to remove useBodyEncodingForURI from that Connector

Be sure to restart Tomcat after making these changes.

Certain searches show the message "The Apache Solr search engine is not available. Please contact your site administrator." instead of results, and/or the Drupal log contains the messages "0" Status: Communication Error or "400" Status ...

This error indicates that the requests sent from Drupal to Solr are somehow invalid. One possible reason is that the requests are too long to be handled by the Solr servlet container: Tomcat or Jetty (the latter distributed with Solr itself).

For Jetty, the solution for this case is to add a line to etc/jetty.xml

  <Set name="headerBufferSize">65535</Set>

within the <Call name="addConnector"> section. Like so:

  <Call name="addConnector">
      <Arg>
          <New class="org.mortbay.jetty.bio.SocketConnector">
            <Set name="port"><SystemProperty name="jetty.port" default="8983"/></Set>
            <Set name="maxIdleTime">50000</Set>
            <Set name="lowResourceMaxIdleTime">1500</Set>
            <!-- Next line added to handle incoming GET requests up to 64k in length -->
            <Set name="headerBufferSize">65535</Set>
          </New>
      </Arg>
    </Call>

and then restarting Solr.

In Tomcat, it is possible to configure the maximum URL length using maxHttpHeaderSize. See: http://tomcat.apache.org/tomcat-5.5-doc/config/http.html

In Apache, use the LimitRequestLine directive. See: http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestline

In IIS http://www.asp.net/Learn/whitepapers/aspnet4#0.2__Toc253429244

Help improve this page

Page status: Not set

You can: