2016-11-06 xxxx org.apache.coyote.http11.Http11Processor - 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.InternalInputBuffer.fill(InternalInputBuffer.java:512) at org.apache.coyote.http11.InternalInputBuffer.fill(InternalInputBuffer.java:501) at org.apache.coyote.http11.InternalInputBuffer.parseHeader(InternalInputBuffer.java:393) at org.apache.coyote.http11.InternalInputBuffer.parseHeaders(InternalInputBuffer.java:268) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1011) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:623) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745)
Tomcat 默认的maxHttpHeaderSize设置好像是4K,我们增加到了8K,即8192。在某次升级时,客户报SSO功能不能使用。后来才发现我们把客户定义的maxHttpHeaderSize值给覆盖了,客户定义的是32K。由于客户复杂的网络,可能会在URL中自动增加了一些其它的参数,导致URL中传递的东西过多,默认的8K还不够用,这里后台就会有上面的报错。把maxHttpHeaderSize值给加大后,这个报错就消失了,问题也得到解决。