How do we increase the maximum allowed HTTP GET query length in Jetty?

34,047

Solution 1

What's the maximum URL length in Tomcat?

Solution 2

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

is now deprecated. You can use:

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

instead.

Solution 3

A little late to the party, but I've just come up against the same problem.

Add the following to the connectors section of jetty.xml:

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

This will increase the header limit from the default of 4KB to 64KB.

Solution 4

To increase the limit on the request header size at Solr side. if you are running Solr on Jetty, perform the following steps:

Open the \server\etc\jetty.xml file. Change to

  • Save the changes.
  • Restart Solr and Sitecore XP.
Share:
34,047

Related videos on Youtube

Michael Moussa
Author by

Michael Moussa

Updated on September 17, 2022

Comments

  • Michael Moussa
    Michael Moussa almost 2 years

    We are using Jetty to run an Apache Solr index. We've had some queries that have grown way beyond the previously expected maximum length, and are now having issues where most queries are not returning any data because the server doesn't respond (browser says "Connection reset").

    These requests are not being made through a browser, they're being made programmatically using the Apache_Solr_Service PHP library. The application is expecting queries to come in as HTTP GET requests, so simply switching to a POST will not solve this problem.

    How can we increase the maximum allowed HTTP GET query length in Jetty?

    Thanks!

  • Michael Moussa
    Michael Moussa about 14 years
    Thanks but I said Jetty, not Tomcat. I can't seem to find anywhere in Jetty's configuration files where I would put the settings you've linked to.
  • JamesRyan
    JamesRyan about 14 years
    headerbuffersize?
  • Michael Moussa
    Michael Moussa about 14 years
    Tried it. No luck.
  • Michael Moussa
    Michael Moussa about 14 years
    We decided to ditch Jetty and switch to Tomcat. After doing so, we were able to make the changes indicated in link you provided and are no longer experiencing problems. Thanks!
  • Tom Harrison Jr
    Tom Harrison Jr over 10 years
    This solution worked for us. The symptom in the logs was java.io.IOException: FULL. Make sure to add the setting in whichever active addConnector section you're using.
  • Redtopia
    Redtopia about 9 years
    I am using Solr 4, and using <Set name="headerBufferSize">65536</Set> prevented the instance from starting. Using <Set name="requestHeaderSize">65535</Set> worked.
  • Tyler Collier
    Tyler Collier almost 4 years
    I wasn't sure where to put the config setting. For me it was under dist/server/etc/jetty.xml.