《Springboot开发问题纪要》java.lang.IllegalArgumentException: Request header is too large
来源:互联网 发布:unity3d导入fla 编辑:程序博客网 时间:2024/06/06 19:09
问题日志:java.lang.IllegalArgumentException: Request header is too large
java.lang.IllegalArgumentException: Request header is too large at org.apache.coyote.http11.Http11InputBuffer.fill(Http11InputBuffer.java:701) at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:455) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:667) 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:1434) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) 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 server xml
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" maxHttpHeaderSize="65536" maxPostSize="4194304" URIEncoding="UTF-8"/>
原因分析:
在tomcat的org.apache.coyote.http11.AbstractHttp11Protocol类中定义了其默认值:
/** * Maximum size of the HTTP message header. */ private int maxHttpHeaderSize = 8 * 1024;
所以,当请求头大于 8 * 1024,就会报错。针对这样的大数据量的请求,需要单独配置这个maxHttpHeaderSize的值。
参考:
http://tomcat.apache.org/tomcat-8.0-doc/config/ajp.html
阅读全文
0 0
- 《Springboot开发问题纪要》java.lang.IllegalArgumentException: Request header is too large
- java.lang.IllegalArgumentException: Request header is too large
- 13.8 java.lang.IllegalArgumentException: Request header is too large
- java.lang.IllegalArgumentException: Request header is too large的解决方法
- java.lang.IllegalArgumentException: Request header is too large的解决
- java.lang.IllegalArgumentException: Request header is too large
- Request header is too large
- http post request header is too large 问题
- Tomcat:Request header is too large
- java.lang.IllegalArgumentException: KeyValue size too large
- http post request header is too large 解决方案
- Glassfish Request URI is too large 问题的解决
- springboot Caused by: java.lang.IllegalArgumentException: Property 'sessionFactory' is required
- hbase插入数据时,报错java.lang.IllegalArgumentException: KeyValue size too large
- 向Hbase插入时,报错java.lang.IllegalArgumentException: KeyValue size too large的解决办法
- [错误]java.lang.IllegalArgumentException: Index for header 'XXX' is 1 but CSVRecord only has 1 val
- HTTP Status 500 - Request processing failed; nested exception is java.lang.IllegalArgumentException:
- 上传文件异常问题 | 413 Request Entity Too Large
- 无法执行添加/移除操作,因为代码元素**是只读的
- 《JSP极简教程》c:forEach 如何输出序号
- Scratch编程初体验
- 《JSP极简教程》如何在JSP页面输出HTML文本而不被转义
- 《Spring Boot开发:从0到1》大纲结构
- 《Springboot开发问题纪要》java.lang.IllegalArgumentException: Request header is too large
- Java采用HttpURLConnection请求调用服务时中文乱码问题
- 《Springboot极简教程》问题解决:Logging system failed to initialize using configuration from 'logback.xml '
- hibernate连接MySQL数据库小例子
- 《Spring Boot极简教程》第8章 Spring Boot集成Groovy,Grails开发
- 《Spring Boot极简教程》附录4 Java编程简史
- 《Spring Boot极简教程》附录3 编程简史
- hadoop实战随笔_0717
- 《Spring Boot极简教程》第8_章: Spring Boot集成Groovy混合Java开发