Chat with us, powered by LiveChat
JBoss EAP 6: Request header is too large

If, when testing a Java application on a JBoss EAP 6 Server, a message like the following appears:

12:12:27,174 DEBUG [org.apache.coyote.http11] (http-127.0.0.1:8080-3) JBWEB003070: Error parsing HTTP request header: java.lang.IllegalArgumentException: JBWEB002015: Request header is too large
   at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:741) [jbossweb-7.5.24.Final-redhat-1.jar:7.5.24.Final-redhat-1]
   at org.apache.coyote.http11.InternalInputBuffer.parseHeader(InternalInputBuffer.java:610) [jbossweb-7.5.24.Final-redhat-1.jar:7.5.24.Final-redhat-1]
   at org.apache.coyote.http11.InternalInputBuffer.parseHeaders(InternalInputBuffer.java:507) [jbossweb-7.5.24.Final-redhat-1.jar:7.5.24.Final-redhat-1]
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825) [jbossweb-7.5.24.Final-redhat-1.jar:7.5.24.Final-redhat-1]
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:656) [jbossweb-7.5.24.Final-redhat-1.jar:7.5.24.Final-redhat-1]
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.5.24.Final-redhat-1.jar:7.5.24.Final-redhat-1]
   at java.lang.Thread.run(Unknown Source) [rt.jar:1.8.0_144]

It is because the size of the request we send is much larger than the allowed size, than by default of 8 KB.

To solve this message, simply add the following property to either the standalone.xml or domain.xml file in which we will increase the maximum allowed of the request to 64 KB:

<property name="org.apache.coyote.http11.Http11Protocol.MAX_HEADER_SIZE" value="65536"/>

Then we restart the server and test the application again.

We will see that the message has disappeared and that our application works normally!

Comments are closed.