Request Header is Too Large

Last modified by superadmin on 2026/11/25 21:30

The navigation tree or Live Data fail to load when a request exceeds Tomcat's header size, until maxHttpHeaderSize is raised.

Explanation

Some XWiki components, such as the navigation tree or LiveData, may fail to load. The Tomcat logs may contain errors similar to the following:

java.lang.IllegalArgumentException: Request header is too large
 org.apache.coyote.http11.Http11InputBuffer.fill(Http11InputBuffer.java:785)
 org.apache.coyote.http11.Http11InputBuffer.parseHeader(Http11InputBuffer.java:940)
 org.apache.coyote.http11.Http11InputBuffer.parseHeaders(Http11InputBuffer.java:607)
 org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:525)
 org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
 org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:818)
 org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1626)
 org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
 java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
 java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
 org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
 java.base/java.lang.Thread.run(Thread.java:834)

Cause

Tomcat limits the total size of the HTTP request headers to maxHttpHeaderSize bytes (8192 by default). A large number of cookies sent by the browser can push the request headers past that limit.

Solution

Increase the maxHttpHeaderSize value for Tomcat:

  1. Open the TOMCAT_HOME/conf/server.xml file.
  2. Locate the <Connector> element used by your HTTP connector.
  3. Increase the maxHttpHeaderSize value. For example:
    <Connector port="8080" maxHttpHeaderSize="65536" />
  4. Save the file.
  5. Restart Tomcat.

Related

Get Connected