欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

java.lang.IllegalArgumentException: Request header is too large

程序员文章站 2022-07-15 22:31:05
...

异常如下:

 java.lang.IllegalArgumentException: Request header is too large
        at org.apache.coyote.http11.Http11InputBuffer.fill(Http11InputBuffer.java:702)
        at org.apache.coyote.http11.Http11InputBuffer.parseHeader(Http11InputBuffer.java:848)
        at org.apache.coyote.http11.Http11InputBuffer.parseHeaders(Http11InputBuffer.java:561)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:699)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
        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)

解决方法:

设置tomcat的配置文件server.xml,添加如下配置(可参考下图):

maxPostSize="-1" maxHttpHeaderSize ="102400"

java.lang.IllegalArgumentException: Request header is too large

相关标签: 常见异常总结