springcloud feign请求时报错 Request header is too large
程序员文章站
2022-03-26 19:32:10
...
java.lang.IllegalArgumentException: Request header is too large
at org.apache.coyote.http11.InternalNioInputBuffer.fill(InternalNioInputBuffer.java:111)
at org.apache.coyote.http11.AbstractNioInputBuffer.parseRequestLine(AbstractNioInputBuffer.java:268)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1009)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1502)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1458)
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的限值。本来post请求是没有参数大小限制,但是springboot内置服务器有自己的默认大小。
加上如下配置:
server.tomcat.max-http-header-size=10485760#10M
上一篇: meta标签