Request header is too large

6,851

There was no body in the request, everything was in the header

With lots of web searching I learned that Tomcat's default maximum header size is 8192 bytes. I added a "maxHttpHeaderSize="9216" to the Connector definition in server.xml. Problem solved.

Share:
6,851

Related videos on Youtube

Montana
Author by

Montana

Updated on September 18, 2022

Comments

  • Montana
    Montana over 1 year

    I am getting this entry in my Tomcat 8.5 stderr log:

    16-Jan-2018 02:38:04.089 INFO [http-nio-8080-exec-2] org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request header Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level. java.lang.IllegalArgumentException: Request header is too large at org.apache.coyote.http11.Http11InputBuffer.parseHeaders(Http11InputBuffer.java:571) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:683) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1441) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source)

    It occurs when the size of the request body is approx. 8kb.

    How can I get more detail about this error? Is there a way I can view the header?